PHP code example of allysonsilva / laravel-artisan-domain-contexts
1. Go to this page and download the library: Download allysonsilva/laravel-artisan-domain-contexts library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
allysonsilva / laravel-artisan-domain-contexts example snippets
bash
php artisan vendor:publish --tag="context-config"
bash
php artisan make:job --context=Foo MyJob
bash
php artisan make:model --context=Post --context-namespace=PostDomain Post
bash
php artisan make:event YourEvent
app
└── Domain
├── Foo
│ └── Database
│ ├── Migrations
│ │ ├── 2022_02_30_000000_create_baz_table.php
│ │ └── 2022_02_30_000000_create_foo_table.php
│ └── Seeders
│ ├── BazTableSeeder.php
│ └── FooTableSeeder.php
├── Post
│ └── Database
│ ├── Migrations
│ │ ├── 2022_02_30_000000_create_posts_1_table.php
│ │ ├── 2022_02_30_000000_create_posts_2_table.php
│ │ └── 2022_02_30_000000_create_posts_3_table.php
│ └── Seeders
│ ├── PostsTableSeeder1.php
│ ├── PostsTableSeeder2.php
│ └── PostsTableSeeder3.php
└── User
└── Database
├── Migrations
│ ├── 2022_02_30_000000_create_users_1_table.php
│ ├── 2022_02_30_000000_create_users_2_table.php
│ └── 2022_02_30_000000_create_users_3_table.php
└── Seeders
├── UsersTableSeeder1.php
├── UsersTableSeeder2.php
└── UsersTableSeeder3.php
bash
php artisan migrate:<fresh or refresh> --context=YOUR_CONTEXT
bash
php artisan migrate:<fresh or refresh>
bash
php artisan $command --only-default
bash
php artisan db:seed --only-default