larakeeps/lara-driven

Lara-Driven is a package designed to create and organize layers using the Domain Drive Design methodology.

V1.0.19 2024-02-23 02:39 UTC

This package is auto-updated.

Last update: 2024-06-23 03:20:44 UTC


README

Lara-Driven

Lara-Driven is a package designed to create and organize layers using the Domain Drive Design methodology.

This repository is only compatible with laravel: 7.* to 11.*

Installation

First Step, execute the command.

composer require larakeeps/lara-driven

Second step, add the LaraDrivenServiceProvider. Open config/app.php and add a new item to the providers array.

'providers' => ServiceProvider::defaultProviders()->merge([
        /*
         * add the service provider below.
         */
        \Larakeeps\LaraDriven\Providers\LaraDrivenServiceProvider::class
        
        //rest of your code......
         
]

now lara-driven is ready for operation.

lara-drive command has an argument called domain, where you can directly specify the name of the domain to be created.

php artisan lara-driven:make {domain?}

To publish lara-driven settings, run the command below

php artisan lara-driven:publish

//OR 

php artisan vendor:publish --tag=lara-driven-config

To create a domain with the help of Lara-Driven, run the command below.

php artisan lara-driven:make

After executing the command, simply pass the information requested by Lara-Driven into the terminal. Below is an example of information.

Enter your domain name:
 > Company

 Do you want to keep the domain name as the folder name? [Company] (yes/no) [yes]:
 > yes

 Do you want to create a [Model] for the domain? (yes/no) [yes]:
 > yes

 Do you want to create [Migration], [Seed] or [Factory]? (yes/no) [yes]:
 > yes

 Select one or more classes to manipulate your database. [Migration]:
  [0] Migration
  [1] Seed
  [2] Factory
  [3] All
 > 3

 Do you want to create a [Policy] for your model? (yes/no) [no]:
 > yes

 Do you want to create an empty [Service]? (yes/no) [no]:
 > no

 Do you want to create an [Interface] for your service? (yes/no) [no]:
 > yes

 Do you want to create the [Repository] to separate model actions from your service? (yes/no) [yes]:
 > yes

 Do you want to create an [Interface] for your repository? (yes/no) [no]:
 > yes

 Do you want to create a [Controller] for your domain? (yes/no) [yes]:
 > yes

 Do you want to create a [Request] for processing and validation of your controller? (yes/no) [yes]:
 > yes

 Do you want to install [Routes] on your domain? (yes/no) [yes]:
 > yes

 Which routes do you want to install? [Web]:
  [0] Web
  [1] Api
  [2] Both
 > 2

 Do you want to assign the routes to the [Controller]? (yes/no) [yes]:
 > yes

 Do you want to add [Middleware] to your routes? (yes/no) [yes]:
 > yes

 Do you want to create the [Config] file on your domain? (yes/no) [yes]:
 > yes 

 Do you want to create the [Command] file for your domain? (yes/no) [no]:
 > yes
 
  INFO  Clearing cached bootstrap files.

  events .................................................................................................................................. 1ms DONE
  views ................................................................................................................................... 4ms DONE
  cache ................................................................................................................................... 2ms DONE
  route ................................................................................................................................... 2ms DONE
  config .................................................................................................................................. 1ms DONE
  compiled ................................................................................................................................ 1ms DONE

Don't forget to follow me on github and star the project.


My contacts

E-mail: douglassantos2127@gmail.com

Linkedin: Acessa Perfil