Skip to content

A Laravel package which created to manage booking of a golf system on the Cara/enviro Laravel app.

License

Notifications You must be signed in to change notification settings

ariff-fikri/golfbooking-module

Repository files navigation

Golf Booking Module

Latest Version on Packagist

Total Downloads

cara/golfbooking-module is a Laravel package which created to manage booking of a golf system on the Cara/enviro Laravel app. Module is just like a Laravel package, it has some views, controllers or models. This package is supported and tested in Laravel 8.

Install

This package require another package to be installed. run the following command to install it first:

composer require nwidart/laravel-modules

Autoloading

By default, the module classes are not loaded automatically. You can autoload your modules using psr-4 on your composer.json. For example:

{
	"autoload": {
		"psr-4": {
			"App\\": "app/",
			"Modules\\": "Modules/",
		}
}

Be sure to run this command afterwards:

composer dump-autoload

After that install an additional composer plugin which will move the module files automatically:

composer require joshbrw/laravel-module-installer

Then you can install through Composer, run the following command:

composer require cara/golfbooking-module

Optionally, you can add a DEFAULT_PASSWORD_SEEDER in your .env for the general password to be seed in your database.

Run this command to enable the module:

php artisan module:enable golfBooking 

Run this command to install all the dependencies needed for the module:

php artisan command:initializeCommand

This command will automatically enable the module, publish it to the local project, migrate all the migrations inside the module, and also seed it.

Last thing, inside your project config > auth.php , change the providers array with the module's User model:

'providers' => [
	'users' => [
		'driver' => 'eloquent',
-		'model' =>  User::class, // Remove this line
+		'model' =>  Modules\GolfBooking\Models\User::class, // Change it to this
	],
],

Credits

About Ariff Fikri

Ariff Fikri is a senior web developer specialising on the Laravel framework. Visit my website.

About

A Laravel package which created to manage booking of a golf system on the Cara/enviro Laravel app.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published