harendrasingh's avatar

Laravel 5.9 Wish List

After The Huge laravel update of 5.8, Let's create a wish list for upcoming new update features and functionalities of the upcoming laravel version.

Kindy share your unique feature wish list for this release!

Harry, Thanks

0 likes
18 replies
jlrdw's avatar

Remove some of the excess helpers and clauses and get back to basics. How many different where clauses are needed as an example.

@c and @s I know, I know, not happening.

2 likes
RoboRobok's avatar

I am really looking forward for better relationship definitions. They shouldn’t have been methods declared on both ends (DRY). Maybe in Laravel 6.0?

martinszeltins's avatar

I'd love to see a whereLike implementation. Perhaps even better integration/optimization for Vue?

2 likes
shez1983's avatar

i would love inbuilt caching in models so we dont have to use packages which rarely offer caching with relationships..

CodingIsEasy's avatar

More boiler plate stuff like php artisan:make auth to save having to do the same thing on most projects. Roles and permissions, admin area would be cool

Also a library to write your own api docs would be nice

2 likes
roerjo's avatar

I create my own factories for incoming 3rd party API requests/webhooks for testing. It would be nice if Laravel had support for non-model factories out-of-box.

roerjo's avatar

Some kind of out-of-the-box support for documentation, both API and non-API, would be cool too

1 like
Robstar's avatar

@SHEZ1983 - Why do you need extra packages to cache Eloquent queries? Caching is baked into the framework.

Robstar's avatar

@CODINGISEASY - No reason why you can't create that yourself. I'd be surprised to see any further make:x commands the next release.

shez1983's avatar

@ROBSTAR - automatic caching... ie what some packages out there do it automatically so you dont have to write

cache::remember()... and the nhave to cache::forget()....

crnkovic's avatar
  • Under-the-hood Password Reset changes (if you're not familiar, default password broker doesn't even use validator to validate data, but rather inline validation for length of password, etc). Unlike login and registration functionality, it's really hard to customize how password broker validates data)
  • Remove a good amount of helpers (for example: request(), auth(), dispatch_now(), etc)
  • Prefer DI instead of Facades (for better autocompletion), in both docs and stubs
  • Better routing system (if you have a lot of routes, it can get pretty messy in the web.php file. Yes, require and include are my friends, but I don't really like to do that all the time)
    • I don't really like the Route::get('uri', 'Controller@action') approach. I think something like: $router->get('uri')->controller(Controller::class)->method('action') (maybe this is already possible, idk) looks much better and cleaner
  • Move all core translations to json files (I hate when I see trans('some-file.some-key.some-other-key')
  • Value-object casting (cast attribute into a value object)
  • Better relationship support (Rails does this nicely, I hate when I have a model with 15 relationship methods, would be nice to declare all of them in like a boot method: $this->belongsTo(Model::class); $this->belongsTo(AnotherModel::class)
  • Better support for chained jobs, where the model is not sent through each job but sent like in the Pipeline:
// Before
JobA::withChain([
    new JobB($model),
    new JobC($model),
    new JobD($model),
    new JobE($model),
])->dispatch($model);

// After
(new JobA($model))->chain([
    JobB::class,
    JobC::class,
    JobD::class,
    JobE::class,
])->dispatch();
  • Per-job-instance before/after hooks (execute some code before and after the job instance goes through the queue). Not sure if this is even possible seeing how data is serialized in the queue
(new Job($model))->after(function ($job) use ($logger) {
    $logger->info('Job Finished');
})->dispatch();

I know a lot of these stuff is not possible now, but hey :)

2 likes
playsis's avatar

Let Collection class paginate

$collection = collect([ 
    ['firstname' => 'John', 'lastname' => 'doe'],
    ['firstname' => 'Billy', 'lastname' => 'Watson']
]);

$paginated = $collection->paginate(10);

Please or to participate in this conversation.