This article brings you an introduction to the installation steps of laravel5.5 and laravel-admin. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Configuring laravel-admin
The official tutorial is still no problem, but I also encountered a little pitfall, let’s make a record again
Installing Laravel
Laravel uses Composer to manage dependencies, so make sure Composer is installed on the machine before installation (if it is not installed yet, refer to this document to install it).
Through the Laravel installer
First, install the Laravel installer through Composer:
composer global require "laravel/installer"
Make sure $HOME/.composer/vendor/bin is in the system path (corresponding to Mac The path is ~/.composer/vendor/bin, and the Windows corresponding path is ~/AppData/Roaming/Composer/vendor/bin, where ~ represents the current user's home directory), otherwise the laravel command cannot be called in any path on the command line.
After the installation is complete, you can create a new Laravel application in the current directory with a simple laravel new command. For example, laravel new blog will create a new application named blog and include all Laravel dependencies. . This installation method is much faster than installing through Composer:
laravel new blog
If you have installed an old version of Laravel installer before, you need to update it before you can install the latest Laravel 5.5 framework application:
composer global update
Pass Composer Create-Project
You can also install Laravel applications through Composer's create-project command in the terminal:
composer create-project --prefer-dist laravel/laravel laravel-admin
If you want to download and install other versions of Laravel applications, such as version 5.5, you can use This command:
composer create-project --prefer-dist laravel/laravel laravel-admin 5.5.*。
Note
PHP7.0.30 error is reported, the document says PHP>7.0.0 is enough, but this way of writing seems to be only possible for 7.1.
## This way of writing is not recognized, just remove it OK. Or upgrade to a higher version of PHP. Pay attention to open the openssl
.env file and follow the regular configuration
Be careful not to write the wrong database table name
ThenFirst make sure laravel is installed and the database connection is set correctly. Then enter the laravel directory and executecomposer require encore/laravel-admin
php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider"
php artisan admin:install
After starting the service, browse Open http://localhost/admin/ and log in using the username admin and password admin.Error report:
##Finally Enter config/filesystems.php and add
'admin' => [ 'driver' => 'local', 'root' => public_path('upload'), 'visibility' => 'public', 'url' => env('APP_URL').'/public/upload/', ],
Modify language:
Open config/app.php and modify en -> zh-CN'locale' => 'zh-CN',
The above is the detailed content of Introduction to the installation steps of laravel5.5 and laravel-admin. For more information, please follow other related articles on the PHP Chinese website!