2017 © Pedro Peláez
 

library surveys

Survey Laravel package

image

dbr0/surveys

Survey Laravel package

  • Friday, July 28, 2017
  • by dbr0
  • Repository
  • 1 Watchers
  • 0 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 25 % Grown

The README.md

Surveys

A Laravel survey package, (*1)

Add to your Laravel project:, (*2)

In composer.json under "require" add:, (*3)

"dbr0/surveys": "^0.0.11"

Run: composer update., (*4)

Add, (*5)

dbr0\surveys\SurveysServiceProvider::class,

to your config/app/ file under 'providers'., (*6)

Publish config/migrations/views:, (*7)

php artisan vendor:publish --provider="dbr0\surveys\SurveysServiceProvider" --tag=config
php artisan vendor:publish --provider="dbr0\surveys\SurveysServiceProvider" --tag=migrations
php artisan vendor:publish --provider="dbr0\surveys\SurveysServiceProvider" --tag=views`

Run: php artisan migrate, (*8)

Add, (*9)

use SurveyOwner;

to your desired model. Default is App\User but you still need to add the use SurveyOwner to it., (*10)

Update owner_model array item in config/dbr0-surveys/main.php with name of your model. Default is App/User., (*11)

Access control and Middleware

A package comes with dummy middleware which you can publish using:, (*12)

php artisan vendor:publish --provider="dbr0\surveys\SurveysServiceProvider" --tag=middleware

To use the middlewares you need to add them to $routeMiddleware variable inside of app/Http/Kernel.php file., (*13)

ie., (*14)

protected $routeMiddleware = [
        ...
        'visibleSurveys' => VisibleSurveys::class,
    ];

You can update these middlewares to limit user CRUD actions. To apply them to certain route you need to update the config file., (*15)

ie., (*16)

'routes' => [ //routes stuff
        ...
        'middleware_index' => [visibleSurveys], //add middleware to index
        ...
        ]

This way you can limit access to listing of surveys. The same logic can be applied to other routes., (*17)

The Versions

28/07 2017

dev-master

9999999-dev

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.15

0.0.15.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.14

0.0.14.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.13

0.0.13.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.12

0.0.12.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.11

0.0.11.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.10

0.0.10.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.9

0.0.9.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.8

0.0.8.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.7.1

0.0.7.1

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.7

0.0.7.0

Survey Laravel package

  Sources   Download

MIT

The Requires

 

by Avatar dbr0

laravel surveys

28/07 2017

0.0.6

0.0.6.0

Survey Laravel package

  Sources   Download

28/07 2017

0.0.5

0.0.5.0

Survey Laravel package

  Sources   Download

28/07 2017

0.0.4.1

0.0.4.1

Survey Laravel package

  Sources   Download

28/07 2017

0.0.3

0.0.3.0

Survey Laravel package

  Sources   Download