I need to deploy a Laravel project installed on a dev pc on a Linux server.
After downloading everything via Git, some folders are ignored by .gitignore
.
How do I turn Composer to reinstall all dependencies? Do you have npm too?
I need to deploy a Laravel project installed on a dev pc on a Linux server.
After downloading everything via Git, some folders are ignored by .gitignore
.
How do I turn Composer to reinstall all dependencies? Do you have npm too?
You can follow the tutorial for installing and configuring laravel here at official documentation .
Considering that you have php
and composer
in your global variable PATH
, for a new installation of Laravel, run:
composer create-project laravel/laravel nome-do-seu-projeto --prefer-dist
I will again consider that you are running a Linux
operating system and git
installed, do the following:
git clone [email protected]:seuprojeto
cd seuprojeto
composer install --no-scripts
cp .env.example .env
php artisan key:generate
Then you should configure the .env file and run the migrations with:
php artisan migrate --seed
Regarding npm, this varies from project to project, but you will probably also need to run the following commands:
npm install
bower install
gulp
If you have no idea what these commands mean, I suggest you start studying one by one before putting an application into production. The official documentation of Laravel 5.2
contains two example projects developed step-by-step, it's not a bad idea to start there, it's in English but the text is easy to read.