Requirements
Laravel has a set of requirements in order to run smoothly in specific environment. Please see the requirements section in Laravel documentation.
Metronic similarly uses additional plugins and frameworks, so ensure that you have Composer and Node installed on your machine.
Assuming your machine meets all the requirements - let's proceed to the installation of Metronic Laravel integration (skeleton).
The root directory of your application will contain an .env.example
file. You should copy the file manually and rename it to .env
or run command cp .env.example .env
.
-
Open in cmd or terminal app and navigate to this folder
-
Run following commands
composer install
cp .env.example .env
For Windows command line tool use copy command. For unix style - cp.
php artisan key:generate
npm install
npm run dev
php artisan serve
-
And navigate to generated server url http://127.0.0.1:8000
For more information about the Laravel installation, please check out on this link https://laravel.com/docs/7.x/installation
Mix is a configuration layer on top of Webpack. So to run your Mix tasks, you only need to execute one of NPM scripts that is included with the default Laravel package.json
file:
// Run all Mix tasks...
npm run dev
// Run all Mix tasks and minify output...
npm run production
The npm run watch
command will continue running in your terminal and watch all relevant files for changes. Webpack will then automatically recompile your assets when it detects a change:
npm run watch
For more information about the Laravel compiling assets, please check out on this link https://laravel.com/docs/7.x/mix