Skip to content

Commit cfbd518

Browse files
Merge pull request #1035 from InfyOmLabs/next_major
Next major version with blade templates support
2 parents 51527ad + c0b4a6b commit cfbd518

File tree

176 files changed

+4405
-6890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+4405
-6890
lines changed

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
run: composer install --prefer-dist --no-interaction --no-suggest
3030

3131
- name: Execute tests
32-
run: vendor/bin/phpunit --verbose
32+
run: vendor/bin/pest

composer.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232
},
3333
"require-dev": {
3434
"phpunit/phpunit": "^9.5.10",
35-
"mockery/mockery": "^1.4.4"
35+
"mockery/mockery": "^1.4.4",
36+
"orchestra/testbench": "^7.5",
37+
"pestphp/pest": "^1.21",
38+
"pestphp/pest-plugin-laravel": "^1.2"
3639
},
3740
"autoload": {
3841
"psr-4": {
@@ -61,5 +64,10 @@
6164
}
6265
],
6366
"minimum-stability": "dev",
64-
"prefer-stable": true
67+
"prefer-stable": true,
68+
"config": {
69+
"allow-plugins": {
70+
"pestphp/pest-plugin": true
71+
}
72+
}
6573
}

config/laravel_generator.php

Lines changed: 35 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

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

20+
'livewire_tables' => app_path('Http/Livewire/'),
21+
2022
'repository' => app_path('Repositories/'),
2123

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

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

36-
'repository_test' => base_path('tests/Repositories/'),
37-
38-
'api_test' => base_path('tests/APIs/'),
39-
40-
'tests' => base_path('tests/'),
41-
42-
'views' => resource_path('views/'),
43-
4438
'schema_files' => resource_path('model_schemas/'),
4539

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

5448
'view_provider' => app_path('Providers/ViewServiceProvider.php'),
49+
50+
'tests' => base_path('tests/'),
51+
52+
'repository_test' => base_path('tests/Repositories/'),
53+
54+
'api_test' => base_path('tests/APIs/'),
55+
56+
'views' => resource_path('views/'),
57+
58+
'menu_file' => resource_path('views/layouts/menu.blade.php'),
5559
],
5660

5761
/*
@@ -67,6 +71,8 @@
6771

6872
'datatables' => 'App\DataTables',
6973

74+
'livewire_tables' => 'App\Http\Livewire',
75+
7076
'repository' => 'App\Repositories',
7177

7278
'controller' => 'App\Http\Controllers',
@@ -83,11 +89,11 @@
8389

8490
'factory' => 'Database\Factories',
8591

92+
'tests' => 'Tests',
93+
8694
'repository_test' => 'Tests\Repositories',
8795

8896
'api_test' => 'Tests\APIs',
89-
90-
'tests' => 'Tests',
9197
],
9298

9399
/*
@@ -97,7 +103,7 @@
97103
|
98104
*/
99105

100-
'templates' => 'adminlte-templates',
106+
'templates' => 'adminlte-templates',
101107

102108
/*
103109
|--------------------------------------------------------------------------
@@ -106,7 +112,7 @@
106112
|
107113
*/
108114

109-
'model_extend_class' => 'Eloquent',
115+
'model_extend_class' => 'Illuminate\Database\Eloquent\Model',
110116

111117
/*
112118
|--------------------------------------------------------------------------
@@ -126,18 +132,24 @@
126132

127133
'options' => [
128134

129-
'softDelete' => true,
135+
'soft_delete' => false,
130136

131137
'save_schema_file' => true,
132138

133139
'localized' => false,
134140

135-
'tables_searchable_default' => false,
136-
137141
'repository_pattern' => true,
138142

139143
'resources' => false,
140144

145+
'factory' => false,
146+
147+
'seeder' => false,
148+
149+
'swagger' => false, // generate swagger for your APIs
150+
151+
'tests' => false, // generate test cases for your APIs
152+
141153
'excluded_fields' => ['id'], // Array of columns that doesn't required while creating module
142154
],
143155

@@ -150,37 +162,23 @@
150162

151163
'prefixes' => [
152164

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

155-
'path' => '',
167+
'namespace' => '', // e.g. Admin or Admin\Shipping or Admin\Shipping\Logistics
156168

157-
'view' => '', // using backend will create return view('backend.?.index') type the backend views directory
158-
159-
'public' => '',
169+
'view' => '', // e.g. admin or admin/shipping or admin/shipping/logistics
160170
],
161171

162172
/*
163173
|--------------------------------------------------------------------------
164-
| Add-Ons
174+
| Table Types
175+
|
176+
| Possible Options: blade, datatables, livewire
165177
|--------------------------------------------------------------------------
166178
|
167179
*/
168180

169-
'add_on' => [
170-
171-
'swagger' => false,
172-
173-
'tests' => true,
174-
175-
'datatables' => false,
176-
177-
'menu' => [
178-
179-
'enabled' => true,
180-
181-
'menu_file' => 'layouts/menu.blade.php',
182-
],
183-
],
181+
'tables' => 'blade',
184182

185183
/*
186184
|--------------------------------------------------------------------------
@@ -200,20 +198,13 @@
200198
'deleted_at' => 'deleted_at',
201199
],
202200

203-
/*
204-
|--------------------------------------------------------------------------
205-
| Save model files to `App/Models` when use `--prefix`. see #208
206-
|--------------------------------------------------------------------------
207-
|
208-
*/
209-
'ignore_model_prefix' => false,
210-
211201
/*
212202
|--------------------------------------------------------------------------
213203
| Specify custom doctrine mappings as per your need
214204
|--------------------------------------------------------------------------
215205
|
216206
*/
207+
217208
'from_table' => [
218209

219210
'doctrine_mappings' => [],

phpunit.xml.dist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
99
processIsolation="false"
10-
stopOnFailure="false"
11-
syntaxCheck="false">
10+
stopOnFailure="false">
1211
<testsuites>
1312
<testsuite name="Package Test Suite">
1413
<directory suffix=".php">./tests/</directory>
1514
</testsuite>
1615
</testsuites>
16+
17+
<php>
18+
<env name="APP_KEY" value="BckfSJCXivnK6r38GVIWUAxmbBSjTsmF"/>
19+
</php>
1720
</phpunit>

0 commit comments

Comments
 (0)