Relation Field only returns max of 10 results
Describe the bug Relation field is only returning the 10 most recent records.
Expected behavior Relation field with scope allied should return all the results that match that scope.
My Scope being applied:
public function scopeRes(Builder $query, $restaurant)
{
return $query
->select([
'menu_categories.*'
])
->join('restaurants', 'restaurants.id', '=', 'menu_categories.restaurant_id')
->where('restaurants.restaurant_name', '=', $restaurant)
->get();
}
Server (please complete the following information):
- Platfrom Version: 10.8.2
- Laravel Version: 8.40
- PHP Version: 8
- Database: MySQL
The RelationController generally only reads 10 items. It would be great if you could control it.
No reason to get more then 10 items for Relation. For small lists you can use Select instead.
The difference between the Select field and Relation is that one field displays all options at once, while the other load's information in chunks and is preferable for large tables.
If you need to display all the available options, consider using the Select field.