1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the snippetify package.
5
+ *
6
+ * (c) Evens Pierre <evenspierre@snippetify.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ return [
13
+
14
+ /*
15
+ |-----------------------------------------------------------------------
16
+ | Snippetify ApiGenerator Configuration
17
+ |-----------------------------------------------------------------------
18
+ |
19
+ | A collection of default options to apply to snippet ApiGenerator objects
20
+ |
21
+ | @see {@link https =>//github.com/snippetify/laravel-api-generator}
22
+ */
23
+
24
+ // Define the skeleton of your project here in the module array
25
+ // Or create a 'snippetify-ams.json' file in the root of your project
26
+ 'modules ' => [
27
+ [
28
+ 'name ' => 'Blog ' , // The name of your module in StudlyCase(PascalCase), for namespacing
29
+ 'model ' => [
30
+ 'name ' => 'Article ' , // The name of your model in StudlyCase(PascalCase)
31
+ 'hasUser ' => true , // Is owned by a user,
32
+ 'hasLog ' => true , // Allow model to be loggable,
33
+ 'softDelete ' => true , // Add laravel soft delete feature to model
34
+ 'isSearchable ' => true , // Allow this model to be fulltext searchable using laravel scout library
35
+ 'hasMedia ' => true , // Attach a media to this library using the Spatie Media library
36
+ 'hasSlug ' => true , // Add a slug to this model
37
+ 'issers ' => [ 'published ' , 'activated ' ], // Issers like isPublished, isActivated, etc...
38
+ 'attributes ' => [
39
+ 'name ' => [ 'type ' => 'string ' , 'rules ' => '' , 'fillable ' => true , 'hidden ' => false ],
40
+ ],
41
+ 'relations ' => [ // Relation types: oneToOne, oneToMany, manyToOne, manyToMany
42
+ 'comments ' => [ 'type ' => 'oneToOne ' , 'class ' => 'App\Models\Blog\Comment ' , 'morph ' => false , 'with ' => true , 'inverse ' => true ],
43
+ 'categories ' => [ 'type ' => 'oneToMany ' , 'class ' => 'App\Models\Blog\Category ' , 'morph ' => false , 'with ' => true ],
44
+ ]
45
+ ]
46
+ ]
47
+ ],
48
+
49
+ // App dependencies
50
+ "dependencies " => [
51
+ 'algolia/algoliasearch-client-php ' => '^2.8 ' ,
52
+ 'fruitcake/laravel-cors ' => '^2.0 ' ,
53
+ 'guzzlehttp/guzzle ' => '^7.0.1 ' ,
54
+ 'laravel/sanctum ' => '^2.8 ' ,
55
+ 'laravel/scout ' => '^8.6 ' ,
56
+ 'spatie/laravel-activitylog ' => '^3.16 ' ,
57
+ 'spatie/laravel-medialibrary ' => '^9.4 ' ,
58
+ 'spatie/laravel-query-builder ' => '^3.3 '
59
+ ]
60
+ ];
0 commit comments