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
- dev-main
- dev-fix/user-service/permision-information
- dev-fix/abstract-controller/returnModel
- dev-fix/seeder/checking
- dev-fix/migration/checking-duplicates
- dev-fix/migration/timezonemaps
- dev-update/seeder/user
- dev-update/migration/permissionmap-uuidMorphs
- dev-update/migrations/declaration
- dev-update/composer/dependencies
- dev-update/classes/refactoring
- dev-update/general/stable-package
- dev-update/documentation/instalation-guide
- dev-update/traits/validating-translation-slug
- dev-update/env/variables
- dev-update/finsh-auth-user/creating-full-user
- dev-update/api-auth/using-passport
- dev-update/api-return/stram
- dev-fix/readme/audit-publish
- dev-fix/status-abstracts/re-audit-block-status
- dev-fix/model/removing-audit
- dev-fix/routes-migrations/logs-permission-audit
- dev-fix/middleware/log-location
- dev-update/permissions/user-permission-items
- dev-update/documentation/readme
- dev-fix/abstracts/update-functions
- dev-update/permitions-auth/ready-to-testing
- dev-fix/statusEnum/statuses
- dev-fix/document/namespace
- dev-create/class/format-variables
- dev-fix/migration/permission
- dev-create/permissions/fix-seed
- dev-create/migrations/seeds
- dev-update/functions/array-dates-validation
- dev-create/package-basics/general-functions
This package is auto-updated.
Last update: 2025-03-01 00:29:11 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-passport
already 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/auth
add the gurad api and place his driver as passport:'guards' => [ ... 'api' => [ 'driver' => 'passport', 'provider' => 'users', ], ],
-
On your
config/auth
inside 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-passport
via 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.php
inlocale
replace de defaulten
with:'locale' => 'pt-BR',
-
On your
config/app.php
intimezone
replace de defaultUTC
with:'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