Download the PHP package bisual/laravel-shortcuts without Composer
On this page you can find all versions of the php package bisual/laravel-shortcuts. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bisual/laravel-shortcuts
More information about bisual/laravel-shortcuts
Files in bisual/laravel-shortcuts
Package laravel-shortcuts
Short Description Laravel Shortcuts for Software Agencies
License MIT
Homepage https://github.com/bisual/laravel-shortcuts
Informations about the package laravel-shortcuts
Laravel Shortcuts for Software Agencies
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
This is the contents of the published config file:
Optionally, you can publish the views using
Custom query params usage
You can build different formats of query params to handle sort, select and with in different depths of your query.
-- WITH --
To indicate depth within your query param 'with' you should use this format.
The '..' character indicates one level deeper.
-- ORDER BY --
You can simply indicate the field to order by entering it in your query as you have done all your life.
But you can also choose which fields of your relations to order and in which depth to do it, as well as indicate 'order_by_direction' in the same string.
_If you do not indicate your 'order_bydirection' with ':' next to the field to sort by, it will sort in 'asc' direction by default.
-- SELECT --
You can indicate a single field of your main table to get only that information (you don't need to add the id).
And once again, you can choose what information about your relationship you receive at the same time. Different fields of the same relationship level will be separated by '|'.
⚙️ Generalities
In all cases, to separate different relationships, regardless of the depth level, they must be separated by a ','.
NOTE: The query param 'order_by_direction' is not necessary when using laravel-shortcuts since it is applied directly in 'order_by', using it could cause errors.
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-shortcuts with dependencies
illuminate/contracts Version ^12.0 | ^11.0 | ^10.0 | ^9.0
ramsey/uuid Version ^4.0
spatie/laravel-package-tools Version ^1.14.0