Skip to content

Commit

Permalink
Merge pull request #1035 from InfyOmLabs/next_major
Browse files Browse the repository at this point in the history
Next major version with blade templates support
  • Loading branch information
mitulgolakiya authored Jul 21, 2022
2 parents 51527ad + c0b4a6b commit cfbd518
Show file tree
Hide file tree
Showing 176 changed files with 4,405 additions and 6,890 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
run: composer install --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/phpunit --verbose
run: vendor/bin/pest
12 changes: 10 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5.10",
"mockery/mockery": "^1.4.4"
"mockery/mockery": "^1.4.4",
"orchestra/testbench": "^7.5",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.2"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -61,5 +64,10 @@
}
],
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
79 changes: 35 additions & 44 deletions config/laravel_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

'datatables' => app_path('DataTables/'),

'livewire_tables' => app_path('Http/Livewire/'),

'repository' => app_path('Repositories/'),

'routes' => base_path('routes/web.php'),
Expand All @@ -33,14 +35,6 @@

'api_resource' => app_path('Http/Resources/'),

'repository_test' => base_path('tests/Repositories/'),

'api_test' => base_path('tests/APIs/'),

'tests' => base_path('tests/'),

'views' => resource_path('views/'),

'schema_files' => resource_path('model_schemas/'),

'templates_dir' => resource_path('infyom/infyom-generator-templates/'),
Expand All @@ -52,6 +46,16 @@
'factory' => database_path('factories/'),

'view_provider' => app_path('Providers/ViewServiceProvider.php'),

'tests' => base_path('tests/'),

'repository_test' => base_path('tests/Repositories/'),

'api_test' => base_path('tests/APIs/'),

'views' => resource_path('views/'),

'menu_file' => resource_path('views/layouts/menu.blade.php'),
],

/*
Expand All @@ -67,6 +71,8 @@

'datatables' => 'App\DataTables',

'livewire_tables' => 'App\Http\Livewire',

'repository' => 'App\Repositories',

'controller' => 'App\Http\Controllers',
Expand All @@ -83,11 +89,11 @@

'factory' => 'Database\Factories',

'tests' => 'Tests',

'repository_test' => 'Tests\Repositories',

'api_test' => 'Tests\APIs',

'tests' => 'Tests',
],

/*
Expand All @@ -97,7 +103,7 @@
|
*/

'templates' => 'adminlte-templates',
'templates' => 'adminlte-templates',

/*
|--------------------------------------------------------------------------
Expand All @@ -106,7 +112,7 @@
|
*/

'model_extend_class' => 'Eloquent',
'model_extend_class' => 'Illuminate\Database\Eloquent\Model',

/*
|--------------------------------------------------------------------------
Expand All @@ -126,18 +132,24 @@

'options' => [

'softDelete' => true,
'soft_delete' => false,

'save_schema_file' => true,

'localized' => false,

'tables_searchable_default' => false,

'repository_pattern' => true,

'resources' => false,

'factory' => false,

'seeder' => false,

'swagger' => false, // generate swagger for your APIs

'tests' => false, // generate test cases for your APIs

'excluded_fields' => ['id'], // Array of columns that doesn't required while creating module
],

Expand All @@ -150,37 +162,23 @@

'prefixes' => [

'route' => '', // using admin will create route('admin.?.index') type routes
'route' => '', // e.g. admin or admin.shipping or admin.shipping.logistics

'path' => '',
'namespace' => '', // e.g. Admin or Admin\Shipping or Admin\Shipping\Logistics

'view' => '', // using backend will create return view('backend.?.index') type the backend views directory

'public' => '',
'view' => '', // e.g. admin or admin/shipping or admin/shipping/logistics
],

/*
|--------------------------------------------------------------------------
| Add-Ons
| Table Types
|
| Possible Options: blade, datatables, livewire
|--------------------------------------------------------------------------
|
*/

'add_on' => [

'swagger' => false,

'tests' => true,

'datatables' => false,

'menu' => [

'enabled' => true,

'menu_file' => 'layouts/menu.blade.php',
],
],
'tables' => 'blade',

/*
|--------------------------------------------------------------------------
Expand All @@ -200,20 +198,13 @@
'deleted_at' => 'deleted_at',
],

/*
|--------------------------------------------------------------------------
| Save model files to `App/Models` when use `--prefix`. see #208
|--------------------------------------------------------------------------
|
*/
'ignore_model_prefix' => false,

/*
|--------------------------------------------------------------------------
| Specify custom doctrine mappings as per your need
|--------------------------------------------------------------------------
|
*/

'from_table' => [

'doctrine_mappings' => [],
Expand Down
7 changes: 5 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
stopOnFailure="false">
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>

<php>
<env name="APP_KEY" value="BckfSJCXivnK6r38GVIWUAxmbBSjTsmF"/>
</php>
</phpunit>
Loading

0 comments on commit cfbd518

Please sign in to comment.