General additional package for laravel framework
Publish or create config/btx.php in the host project:
return [
// pgsql | mysql | mariadb | sqlsrv | sqlite | auto
// 'auto' follows the driver of the default database connection.
'database' => 'auto',
'language' => ['id', 'en'],
'base_file_path' => 'public',
'max_query_limit' => 1000,
];
database picks the SQL dialect used by the query filter (ILIKE on PostgreSQL, LIKE
everywhere else). The filter normally reads the driver from the connection the query runs on,
so this is a fallback for when that connection is not resolvable. Leave it on auto.
Install using Composer
Run command composer require btx/btx, then composer dump-autoload
Install Manual
Download repo and extract into your {root project}/packages folder.
├── app
├── config
├── database
├── resources
└── packages
├── btx
...
Add this line autoload.psr-4 in your composer.json (You can choose one or all of them)
"autoload": {
"psr-4": {
...
"Btx\\Query\\":"packages/btx/query/src/",
"Btx\\Common\\":"packages/btx/common/src/",
"Btx\\Http\\":"packages/btx/http/src/",
"Btx\\File\\":"packages/btx/file/src/"
},
"files": [
...
]
}
Register Service Provider into List of Service Provider.
lumen bootstrap/app.php
$app->register(Btx\Query\BtxQueryFilterServiceProvider::class);
$app->register(Btx\Common\BtxCommonServiceProvider::class);
$app->register(Btx\File\BtxFileServiceProvider::class);
$app->register(Btx\Http\BtxHttpServiceProvider::class);
laravel config/app.php
'providers' => [
// Other Service Providers
Btx\Query\BtxQueryFilterServiceProvider::class,
Btx\Common\BtxCommonServiceProvider::class,
Btx\File\BtxFileServiceProvider::class,
Btx\Http\BtxHttpServiceProvider::class
],
then, dump autoload using command composer dump-autoload.