Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nuwave's avatar

@TaylorOtwell The ability to paginate/limit eager loaded relationships on a collection.

For example, it would be awesome if something like this was possible:

$users = App\Models\User::with(['posts' => function ($q) {
    $q->paginate(10); // or limit
}])->get();

The problem right now is that if I wanted to eager load the "posts" relationship on a "User", you have to load all of them. In some cases, this is not a problem, but if a relationship has possibly 1Ks of associations that's a ton of unnecessary data. I realize this is more of an issue with ORM than it is with Eloquent, but I'm wondering if it's possible to resolve w/ JSON types in the DB.

With Mongo, you can store many-to-many (or one-to-many) relationships right on the associated record. So, the "User" model could have a JSON column (MySQL, MariaDB, PostgreSQL) called "posts" which holds the ID of the post(s) it's associated with (along with any other relevant data such as timestamps). If we had this data available without needing to run another query on a pivot table, I'm wondering if it's possible to paginate/limit relationships on a collection?

3 likes
veksen's avatar

It would be nice if the docs were linked to the source.

Also I'd really enjoy if the docs could remember which version of the app I've been browsing, right now a Google search can land me on 4.2, 5.0, 5.1, 5.2.... and swapping versions often brings me to a page that no longer exists. Maybe make this a bit painless.

I understand those are about the docs, but it's my pain at the moment.

Otherwise, I'd also really like having stuff like Password Reset methods more accessible, or more flexible. As in, I'd really like to use Laravel's, but without it attempting to redirect me.

3 likes
nam_co's avatar

Hello Taylor

  1. Artisan command that creates a automatic model of all the tables in the connected DB
  2. Artisan command that shows all the routes with errors
  3. recently I've been getting a LOT of token mismatch when submitting forms
  4. I know is supposed to be easy and carbon is external but changing the lang has been hard

In forge Please enable an option that allows direct external (no ssh tunnel) access to the DB so is easier during development

thanks for the great job

1 like
nathanbarrett's avatar

'AutoMutators' setting. Where, when running migratons, checks the corresponding model (if exists), and overrides protected $dates for every 'timestamp' column found (and also includes created_at, updated_at if column 'timestamps' is found). Adds any 'boolean' column to protected $casts as 'boolean'. And any field whose name ends with 'array' goes into $casts as 'array'. Anything else custom put in $casts or $dates by the developer gets left alone (although I would have no idea what that would be for this scenario).

christopher's avatar

Would love to see some Documentation how to extend Cashier with other Payment Providers.

christopher's avatar

@Jaytee You can add this already just use

php artisan make:controller `YourDirectory/YourController

which is relative to the app/Http/Controllers path.

2 likes
alfonsobries's avatar

Elixir conditions

Sometimes i want to do some tasks only with the production flag, for example i use a image minifier library, and when i use "gulp watch" i need to commetn uncomment the tasks.

elixir(function(mix) {
    mix.less([
        'app.less',
    ])
    .scripts([
        '../app.js',
    ]);

    //*****************
    // Feature i think will be great
    // Only copy files if im in production
    if(is_production_flag) {
        mix.copy('resources/assets/lib/icomoon/fonts', 'public/build/css/fonts')
    }

    // another example: only minify if i use the production flag: gulp --production
    if(is_production_flag) {
        mix.imagemin()
    }
})

Maybe this feature exists but i didnt find how to do it.

3 likes
lindstrom's avatar

@alfonsobries

var isProduction = elixir.config.production;

elixir(function(mix) {
    if (isProduction) {
        // mix away
    }
});
3 likes
Swaz's avatar

How about native access to the after method in a form request. Something like...

public function rules()
{
    return [
        'name' => 'required'
        //...
    ];
}

public function after($validator)
{
    if (somethingElseIsInvalid()) {
        $validator->errors()->add('Something else is invalid.'); 
    }
}
davestewart's avatar

@alfonsobries

if(elixir.config.production){ ... }

Also, take a look at yargs:

gulp --blah
var argv = require('yargs').argv;
if(argv.blah){ ... }
1 like
davorminchorov's avatar

Hey @TaylorOtwell Have you ever thought of making Laravel similar to NodeJS/Express, where you just choose what packages to install or choose from a list of possible packages, instead of using all of them like it is now? Just curious, what's your take on this. I am talking about a component / package based approach.

1 like
BartHuis's avatar

@TaylorOtwell I'll really would like it if the russian doll caching idea of @JeffreyWay would be implemented in 5.3 as a standard way. maybe you could then recognise the objects itself instead of giving it your own cache key's and tags?

edit: if i read the changes after the video was made, it seems giving objects is allready possible?

razum's avatar

Finally, the issue was raised repeatedly. ! We need events for many to many relations (attach, detach, sync methods)

Thijmen's avatar

@Swaz for after validation you can use this in App\Http\Requests\Request:

  public function validator() {
        $v = \Validator::make($this->input(), $this->rules(), $this->messages(), $this->attributes());

        if ( method_exists($this, 'moreValidation')) {
            $this->moreValidation($v);
        }
        return $v;
    }

In your FormRequest you can do this;

 public function moreValidation($validator) {
        $validator->after(function($validator) {
            $maillist = MailList::whereId($this->get('mail_list_id'))
                ->first();
            if ($maillist == null) {
                $validator->errors()->add('mail_list_id', 'Not found.');
            }
        });
    }
ChristophAust's avatar

@TaylorOtwell do you only want suggestions for Laravel or also for Lumen?

Because I think Lumen really needs a good idea on how to implement API versions in the header and not in the url. This is really annoying and I am about to go to full laravel for just a REST API. Tbh. I think Laravel is even the better choice for a REST API atm.

Prullenbak's avatar

I would love a little bit better docs on the more complicated relations like hasManyTrough, and also support for the reverse (belongsToManyTrough??) and maybe even HasManyTroughMany.

BartHuis's avatar

@Prullenbak sounds complicated, just throw your code in the bin and start all over? ;P #dutch #vrimibo

Prullenbak's avatar

@BartHuis lol. It's not like I need that right now at work, but it's something that seems handy to have.

BartHuis's avatar

@Prullenbak de mail was vooral grappig die ik binnenkreeg, "Prullenbak replied to "Laravel 5.3 Wish List" goh, waar zal die vandaan komen ;)

2 likes
StevenCheney's avatar

If this has been mentioned already, my apologies! For those of us who are unfortunately stuck in a Windows environment and must leverage ODBC (I have about 4-5 different database engines I'm connecting to through ODBC), a built in ODBC database driver would be wonderful.

Unfortunately, most of the third party packages out there seem to be abandoned and stuck on version 4 of Laravel. Anyways, just one thing on my wish list!

Thanks for all of the hard work you and the community put into making Laravel such a pleasure to work with.

1 like
sylar's avatar

@TaylorOtwell, how about sanitizers in form request

public function sanitize()
{
    return [
        'title' => 'trim|toUpper',   
    ];
}
13 likes

Please or to participate in this conversation.