Introduction of installation steps of laravel5.5 and laravel-admin

01-28-2024

This article is about the installation steps of laravel5.5 and laravel-admin, which has certain reference value. Friends who need it can refer to it and hope to help you. Configure laravel-admin

The official tutorial is no problem, but it also encountered a little pit. Let's make a record again.

Installing LaravelLaravel uses Composer to manage dependencies, so make sure that Composer is installed on the machine before installation (refer to this document to install it if it is not already installed).

Through Laravel installer

First, install Laravel Installer through Composer:

composer global require "laravel/installer"

Make sure that $HOME/.composer/vendor/bin is in the system path (the corresponding path in Mac is ~/.composer/vendor/bin, and the corresponding path in Windows 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 completed, a new Laravel application can be created in the current directory through a simple laravel new command. For example, laravel new blog will create a new application named blog, which contains all Laravel dependencies. This installation method is much faster than installing through Composer:

laravel new blog

If the old version of Laravel Installer has been installed before, you need to update it before you can install the latest Laravel 5.5 framework application:

composer global update

Through Composer Create-Project

You can also install Laravel application in the terminal through Composer's create-project command:

composer create-project --prefer-dist laravel/laravel laravel-admin

If you want to download and install another version of Laravel application, such as version 5.5, you can use this command:

composer create-project --prefer-dist laravel/laravel laravel-admin 5.5.*。

pay attention to

PHP7.0.30 gives an error, and the document should be written in PHP>7.0.0, but this writing seems to be only available in 7.1.

This writing is not recognized, just remove it. Or upgrade a higher version of PHP, and pay attention to opening openssl.

The. env file can be configured as usual.

Be careful not to misspell the database table names.

then

First, make sure laravel is installed and the database connection settings are correct. Then enter laravel directory for execution.

composer require encore/laravel-admin

Then run the following command to publish the resource:

php artisan vendor:publish --provider="Encore\Admin\AdminServiceProvider"

In this command, the configuration file config/admin.php will be generated, in which the installation address, database connection and table name can be modified. It is recommended to use the default configuration without modification.

Then run the following command to complete the installation:

php artisan admin:install

Success:

After starting the service, open http://localhost/admin/ in the browser, and log in with username admin and password admin.

Error reporting:

Finally, enter config/filesystems.php to join.

'admin' =>

Modify the language: open config/app.php to modify en -> zh-CN.

'locale' => 'zh-CN',

Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us