So you’ve cloned a Laravel project off Github.com. But how can you actually run the existing Laravel project on your local?
Following the quick steps below you will get your project started. The tutorial assumes you already have a PHP, MYSQL local server, like EasyPhp. Ready?
Create a database (remember the database name, username, password for step 3).
From the project directory, type in your terminal:
composer install
cp .env.example .env
php artisan key:generate
Open
.env
and set database (database, username, password)In order to avoid the error Specified key was too long:
Open
Providers/AppServiceProvider.php
and paste the line below (right afteruse Illuminate\Suppoer\ServiceProvider;
):use Illuminate\Support\Facades\Schema;
Scroll down a bit, right inside
public function boot() {}
, paste:Schema::defaultStringLength(191);
Now from your terminal:
php artisan migrate
php artisan db:seed
php artisan serve
You should see something like:
“Laravel development server started: http://127.0.0.1:8000“.
Visit that link to see your project live.
That’s it. You’ve made it!
promo Mediumish WordPress theme
