caiocesar173 / laravel-utils
Utils Laravel Package
Requires
- php: ^8.0
- doctrine/dbal: ^3.4
- laravel/passport: ^11.2
- laravel/socialite: ^5.5
- laravel/ui: ^4.0
- lucascudo/laravel-pt-br-localization: ^1.2
- owen-it/laravel-auditing: ^13.0
- prettus/l5-repository: ^2.7
- spatie/laravel-sluggable: ^3.4
- spatie/laravel-translatable: ^6.0
- stevebauman/location: ^6.2
- watson/validating: ^7.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2026-05-29 01:51:53 UTC
README
Laravel Utils
This is a Laravel package which created to make your life easier. The package comes with most of everything you may need for develop large applications with less effort.
Considerations
- Laravel Utils comes with
laravel-passportalready setup. - Login and CRUD for the User is implemented whith route middlewares.
- Permission system is implemented whith route middlewares.
- Laravel Utils comes with a status system defined.
Installation
-
Install the package via composer:
composer require caiocesar173/laravel-utils
-
Publish owenit via the following command:
php artisan vendor:publish --provider "OwenIt\Auditing\AuditingServiceProvider" --tag="config"
-
On your
config/authadd the gurad api and place his driver as passport:'guards' => [ ... 'api' => [ 'driver' => 'passport', 'provider' => 'users', ], ],
-
On your
config/authinside providers replace de default User Model (App\Models\User::class):'providers' => [ ... 'users' => [ 'driver' => 'eloquent', 'model' => Caiocesar173\Utils\Entities\User::class, ], ],
-
Execute migrations via the following command:
php artisan migrate
-
Setup
laravel-passportvia the following command:php artisan passport:install
-
Seed the database via the following command:
php artisan db:seed
-
Done!
Language
Additionally, the package comes with the laravel-pt-BR-localization language support.
To install it, just do:
-
Publish the translation
php artisan vendor:publish --tag=laravel-pt-br-localization
-
On your
config/app.phpinlocalereplace de defaultenwith:'locale' => 'pt-BR',
-
On your
config/app.phpintimezonereplace de defaultUTCwith:'timezone' => 'America/Sao_Paulo',
-
Done!
Social Login
On your config/services add the provider api and place his driver as passport:
'provider_name' => [ client_id => env(PROVIDER_NAME_CLIENT_ID), client_secret => env(PROVIDER_NAME_CLIENT_SECRET), redirect => env(PROVIDER_NAME_URL_CALLBACK), ],
Envirement Varibles
The Varibles accepted on .env:
#In case you olny want to use the classes inside the package set the UTILS_ONLY_CLASSES=TRUE
UTILS_ONLY_CLASSES = FALSE
UTILS_GEOLOC_ENABLE = TRUE #GeoLoc: locatins, coins, language and internet and phone zones