The default Laravel presets for HGA-based applications
hgacreative/hga-laravel-preset is a Laravel package for the default laravel presets for hga-based applications.
It currently has 0 GitHub stars and 75 downloads on Packagist.
Install it with composer require hgacreative/hga-laravel-preset.
Discover more Laravel packages by hgacreative
or browse all Laravel packages to compare alternatives.
Last updated
This package is intended to be used by employees and colleagues of HGA, but has been made public as the wider community may also benefit from some of these presets. A list of the tweaks we have made are documented below.
App\User model into an appointed Models folder (App\Models), which we favour the structure of for cleaner code on larger projectsUser model to break down the "name" column into "first name" and "last name"Role model, including relationship to the User model/home because this route no longer existsUser model to be App\Models\UserPageController.php for handling our default index route to take the closure away from the web.php routes fileApp\Http\ViewComposers when creating any view composer as per the commentary.User who could possibly be assigned roles in the futureUser model to be App\Models\UserUser modelRole model and subsequent many-to-many relationship with our App\Models\User modelUsersTableSeeder.php and a RolesTableSeeder.php to get things startedUserFactor.php for the time beingUser model, but also to the styling because we don't use Bootstrap.
php artisan make:authapi.php has been updated to prefix "v1" to the routes, which is good practice for software to account for when the API evolves over timeweb.php has been updated to include Laravel's Auth::routes() to handle authentication, whilst removing the stock routes created after running php artisan make:authvendor.js file$web array within App\Http\Kernel.phpstrong_password to ensure a weak password cannot be used when registeringlayouts/app.blade.php viewPassport::ignoreMigrations(), which is in the register() method of AppServiceProvider.php