dees040 / persisting-requests by dees040

Laravel package for create persisting request.
Package Data
Maintainer Username: dees040
Maintainer Contact: (dees040)
Package Create Date: 2017-04-22
Package Last Update: 2017-10-06
Language: PHP
License: Beerware
Last Refreshed: 2023-11-28 15:00:56
Package Statistics
Total Downloads: 59
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Persisting Requests

This package will let you create persisting requests in a breeze. It will call a persisting method on your request via the Laravel Container, meaning you can use dependency injection. The package is inspired by this Laracasts video. The package can help cleaning up your controller.


Install the latest version with composer.

composer require dees040/persisting-request

After installing the packages and the service provider to the providers array in app/config.php.



You can now run the make:persist command.

php artisan make:persist FooBarRequest

In your controller you can now add the fresh created request to the method. Laravel will automatically inject in via dependency injection.


namespace App\Http\Controllers;

use App\Http\Requests\FooBarRequest;

class ActivationController extends Controller
    public function activate(FooBarRequest $request)

        return view('home');

Now in your request you can add dependencies to the persisting method.


namespace App\Http\Requests;

use dees040\PersistingRequests\PersistingRequest;

class FooBarRequest extends PersistingRequest
     * Persist the request.
     * @return void
    public function persisting(ActivationManager $manager)