How To Install Survloop

These are the most targeted instructions, only for installing Survloop after installing Laravel on your [virutal] server. More comprehensive instructions can be found here:


From your Laravel installation's root directory, update `composer.json` to require and easily reference Survloop:
$ nano composer.json
...
"require": {
	...
    "rockhopsoft/survloop": "^0.2",
	...
},
...
"autoload": {
	...
	"psr-4": {
		...
		"RockHopSoft\Survloop\": "vendor/rockhopsoft/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
...
'providers' => [
	...
	RockHopSoftSurvloopSurvloopServiceProvider::class,
	...
],
...
'aliases' => [
	...
	'Survloop' => 'RockHopSoftSurvloopSurvloopFacade',
	...
], ...

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

$ nano config/auth.php
...
'model' => AppModelsUser::class,
...

Migrate, Publish, and Clean Up

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

$ cd ~/homestead/code/survloop
$ echo "0" | php artisan vendor:publish --force
$ php artisan migrate
$ composer dump-autoload
$ php artisan db:seed --class=SurvloopSeeder
$ php artisan db:seed --class=ZipCodeSeeder
$ php artisan db:seed --class=ZipCodeSeeder2
$ php artisan db:seed --class=ZipCodeSeeder3
$ php artisan db:seed --class=ZipCodeSeeder4
$ php artisan optimize:clear

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

You might need to re-run some things outside the virtual box too, e.g.

$ exit
$ cd ~/homestead/code/survloop
$ php artisan optimize:clear
$ composer dump-autoload

Now you should be able to confirm your successful installation by pulling up https://survloop.org in your browser! You can also connect to the database with apps like Sequel Pro, and default login info.... Host: 192.168.10.10 , Username: homestead , Password: secret , Port: 3306 , Database: homestead .

Initialize Survloop Installation

Then browsing to the home page should prompt you to create the first admin user account:

https://survloop.org

If everything looks janky, then manually load the style sheets, etc:

https://survloop.org/css-reload

After logging in as an admin, this link rebuilds many supporting files:

https://survloop.org/dashboard/settings?refresh=2

You can also connect to the database with apps like Sequel Pro, and default login info.... Host: 192.168.10.10 , Username: homestead , Password: secret , Port: 3306 , Database: homestead .