Download the PHP package diviky/bright without Composer
On this page you can find all versions of the php package diviky/bright. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download diviky/bright
More information about diviky/bright
Files in diviky/bright
Package bright
Short Description Framework extension
License MIT
Homepage https://github.com/diviky/bright
Informations about the package bright
An extension to laravel for quick develpment
Install
Filter the query with input values
Database Filter
filter
method used to filter the database columns in query builder. it accepts requets
object as array
.
Avaliable filters
filter[]
uses the $builder->where($column, $value)
. uses array key as column name and value as value. ex: filter[column]='value'
lfilter[]
uses the $builder->where($column, '%'.$value.'%')
with like match. uses array key as column name and value as value. ex: lfilter[column]='value'
use the |
notation to filter or condition. ex: filter[comments|title]=xxx
use the :
notation to filter with relation table. ex: filter[posts:title]=xxx
use the .
notation to filter the table alias in join query. ex: filter[comments.title]=xxx
use the scope[]
to filter the model scopes. ex: scope[status]=1
will run $builder->status(1)
use parse[]
to DSL Parser for a filter query langague.
Example queries in this language:
price = 100
price != 100
price > 100
price < 100
price <= 100
price >= 100
name =~ "brig%"
price > 100 AND active = 1
status = "pending" OR status = "approved"
product.price > 100 AND category.id = 7
product:price > 100 AND category:id = 7
name =~ "Foo%"
created_at > "2017-01-01" and created_at < "2017-01-31"
status = 1 AND (name = "PHP Rocks" or name = "I ♥ PHP")
Model Relations
Return single model with merged attributes from relations
flattern
The flattern($except, $exlcude)
method merge the key and values of releations into primary model attributes and return the combines attributes. Releation keys will overwrite the primary keys if they are same.
flat
The flat($except, $exlcude)
method merge the key and values of releations into primary model attributes and return the combines attributes.
some
The some($keys)
method get few keys from the relationships and primary model.
except
The except($keys)
method get few keys from the relationships and primary model.
merge
The merge($keys)
method add additional key value pairs to model attributes.
concat
The concat($keys)
method add relations key values to attributes.
combine
The combine($keys)
method to merge and contact the releations and attributes.
Eloquent: Collections
flatterns
The flatterns($except, $exlcude)
method merge the key and values of releations into primary model attributes and return the combines attributes. Releation keys will overwrite the primary keys if they are same.
flats
The flats($except, $exlcude)
method merge the key and values of releations into primary model attributes and return the combines attributes.
few
The few($keys)
method get few keys from the relationships and primary model.
Flatten Relations
Return single model with merged attributes from relations
Sorting task
Builder Extended Methods
Search multiple columns and relations
Iterating results
If you like fetch all the rows with chunks and modify using callaback
Get results from multiple tables
If you have data in multiple tables, want to retrive table after table with pagination
Cache the query results
If you want to cache the results
Delete from select query
Get Trashed && Non Trashed
Get non deleted items
Get only deleted items
Raw Expressions
Ordering
Timestamps
Set the timestamps 'created_atand
updated_atfor insert and
updated_at` for update
:id
will be replaced with country id to get states list
Attributes
Custom attributes used in controllers to configure view, resources and layouts
Avaliable attributes
License
The MIT License (MIT). Please see License File for more information.
All versions of bright with dependencies
guzzlehttp/guzzle Version ^7.2
kirschbaum-development/eloquent-power-joins Version ^3.5
laravel/framework Version ^11.2
laravel/sanctum Version ^3.0|^4.0
laravel/ui Version ^4.2
league/flysystem-aws-s3-v3 Version ^3.10
matomo/decompress Version ^2.1
mongodb/laravel-mongodb Version ^5.0
spatie/laravel-permission Version ^6.9
spatie/laravel-schemaless-attributes Version ^2.3