定制 cara/golfbooking-module 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cara/golfbooking-module

Composer 安装命令:

composer require cara/golfbooking-module

包简介

README 文档

README

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.

统计信息

  • 总下载量: 40
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-03-15