How To Install SurvLoop

Updated: March 13, 2019

Install Laravel and its default user authentication and notifications:

$ composer global require "laravel/installer"
$ composer create-project laravel/laravel ProjectName "5.8.*"
$ cd ProjectName
$ php artisan make:auth
$ php artisan vendor:publish --tag=laravel-notifications

Require SurvLoop in Composer

From your Laravel installation's root directory, update `composer.json` to require and easily reference SurvLoop:

$ nano composer.json
...
"require": {
	...
    "wikiworldorder/survloop": "^0.1.*",
	...
},
...
"autoload": {
	...
	"psr-4": {
		...
		"SurvLoop\\": "vendor/wikiworldorder/survloop/src/",
	}
	...
}, ...

After saving the file, run the update to download SurvLoop, and any missing dependencies.

$ composer update

Laravel Config

Add the package to your application service providers in `config/app.php`.

$ nano config/app.php
...
    'name' => 'SurvLoop',
...
'providers' => [
	...
	SurvLoop\SurvLoopServiceProvider::class,
	...
],
...
'aliases' => [
	...
	'SurvLoop' => 'WikiWorldOrder\SurvLoop\SurvLoopFacade',
	...
], ...

Swap out the SurvLoop user model in `config/auth.php`.

$ nano config/auth.php
...
'model' => App\Models\User::class,
...

Migrate, Publish, and Clean Up

Update composer, publish the package migrations, etc...

$ php artisan vendor:publish --force
$ php artisan migrate
$ composer dump-autoload
$ php artisan db:seed --class=SurvLoopSeeder

For now, to apply database design changes to the same installation you are working in, depending on your server, you might also need something like this...

$ chown -R www-data:33 app/Models
$ chown -R www-data:33 database

Initialize Laravel

If all went well thus far, the hopefully you can browse to load the style sheets, etc..

https://browser.path/css-reload

Then browsing to another page should prompt you to create the first admin user account.

https://browser.path

New To Laravel?

Here are some of the basic lessons I've learned in my first three years...

Clearing Caches

You've made changes, but they aren't taking root. You might be able to turn that off and on again with one the common cache clears. These can be run from your Laravel installation's root:

$ php artisan vendor:publish --force
$ php artisan cache:clear
$ php artisan route:cache
$ php artisan view:clear
$ php artisan config:cache
$ php artisan optimize

New To Composer?

Here are some of the basic lessons I've learned in newb land...

$ composer dump-autoload