|
5 | 5 | /** |
6 | 6 | * Provider. |
7 | 7 | */ |
8 | | - 'provider' => 'litecms', |
| 8 | + 'provider' => 'litecms', |
9 | 9 |
|
10 | 10 | /* |
11 | 11 | * Package. |
12 | 12 | */ |
13 | | - 'package' => 'blog', |
| 13 | + 'package' => 'blog', |
14 | 14 |
|
15 | 15 | /* |
16 | 16 | * Modules. |
17 | 17 | */ |
18 | | - 'modules' => ['blog', 'category', 'tag'], |
| 18 | + 'modules' => ['blog', 'category', 'tag'], |
19 | 19 |
|
20 | | - 'blog' => [ |
| 20 | + 'blog' => [ |
21 | 21 | 'model' => [ |
22 | 22 | 'model' => \Litecms\Blog\Models\Blog::class, |
23 | 23 | 'repository' => \Litecms\Blog\Repositories\Eloquent\BlogRepository::class, |
24 | 24 | 'table' => 'blogs', |
25 | | - 'hidden'=> [], |
| 25 | + 'hidden' => [], |
26 | 26 | 'visible' => [], |
27 | 27 | 'guarded' => ['*'], |
28 | | - 'slugs' => ['slug' => 'name'], |
| 28 | + 'slugs' => ['slug' => 'title'], |
29 | 29 | 'dates' => ['deleted_at', 'createdat', 'updated_at'], |
30 | 30 | 'appends' => [], |
31 | | - 'fillable' => ['id', 'category_id', 'title', 'description', 'images', 'tags', 'viewcount', 'slug', 'published', 'published_at', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], |
| 31 | + 'fillable' => [ |
| 32 | + 'id', 'category_id', 'title', 'description', 'images', 'tags', 'viewcount', |
| 33 | + 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at', |
| 34 | + ], |
32 | 35 | 'translatables' => [], |
33 | 36 | 'upload_folder' => 'blog/blog', |
34 | 37 | 'uploads' => [ |
35 | | - /* |
36 | | - 'file' => [ |
37 | | - 'count' => 1, |
38 | | - 'type' => 'file', |
39 | | - ], |
40 | | - */ |
41 | | - 'images' => [ |
| 38 | + /* |
| 39 | + 'file' => [ |
42 | 40 | 'count' => 1, |
43 | | - 'type' => 'image', |
44 | | - ], |
| 41 | + 'type' => 'file', |
| 42 | + ], |
| 43 | + */ |
| 44 | + 'images' => [ |
| 45 | + 'count' => 1, |
| 46 | + 'type' => 'image', |
| 47 | + ], |
45 | 48 | ], |
46 | 49 |
|
47 | 50 | 'casts' => [ |
48 | | - /* |
49 | | - |
| 51 | + /* |
| 52 | +
|
50 | 53 | 'file' => 'array', |
51 | | - */ |
52 | | - 'images' => 'array', |
| 54 | + */ |
| 55 | + 'images' => 'array', |
53 | 56 | ], |
54 | 57 |
|
55 | 58 | 'revision' => [], |
56 | 59 | 'perPage' => '20', |
57 | | - 'search' => [ |
58 | | - 'name' => 'like', |
| 60 | + 'search' => [ |
| 61 | + 'name' => 'like', |
59 | 62 | 'status', |
60 | | - ] |
| 63 | + ], |
61 | 64 | ], |
62 | 65 |
|
63 | 66 | 'controller' => [ |
|
66 | 69 | 'module' => 'Blog', |
67 | 70 | ], |
68 | 71 | ], |
69 | | - 'category' => [ |
| 72 | + 'category' => [ |
70 | 73 | 'model' => [ |
71 | 74 | 'model' => \Litecms\Blog\Models\Category::class, |
72 | 75 | 'repository' => \Litecms\Blog\Repositories\Eloquent\CategoryRepository::class, |
73 | 76 | 'table' => 'blog_categories', |
74 | | - 'hidden'=> [], |
| 77 | + 'hidden' => [], |
75 | 78 | 'visible' => [], |
76 | 79 | 'guarded' => ['*'], |
77 | 80 | 'slugs' => ['slug' => 'name'], |
78 | 81 | 'dates' => ['deleted_at', 'createdat', 'updated_at'], |
79 | 82 | 'appends' => [], |
80 | | - 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], |
| 83 | + 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], |
81 | 84 | 'translatables' => [], |
82 | 85 | 'upload_folder' => 'blog/category', |
83 | 86 | 'uploads' => [ |
84 | | - /* |
85 | | - 'images' => [ |
86 | | - 'count' => 10, |
87 | | - 'type' => 'image', |
88 | | - ], |
89 | | - 'file' => [ |
90 | | - 'count' => 1, |
91 | | - 'type' => 'file', |
92 | | - ], |
93 | | - */ |
| 87 | + /* |
| 88 | + 'images' => [ |
| 89 | + 'count' => 10, |
| 90 | + 'type' => 'image', |
| 91 | + ], |
| 92 | + 'file' => [ |
| 93 | + 'count' => 1, |
| 94 | + 'type' => 'file', |
| 95 | + ], |
| 96 | + */ |
94 | 97 | ], |
95 | 98 |
|
96 | 99 | 'casts' => [ |
97 | | - /* |
98 | | - 'images' => 'array', |
99 | | - 'file' => 'array', |
100 | | - */ |
| 100 | + /* |
| 101 | + 'images' => 'array', |
| 102 | + 'file' => 'array', |
| 103 | + */ |
101 | 104 | ], |
102 | 105 |
|
103 | 106 | 'revision' => [], |
104 | 107 | 'perPage' => '20', |
105 | | - 'search' => [ |
106 | | - 'name' => 'like', |
| 108 | + 'search' => [ |
| 109 | + 'name' => 'like', |
107 | 110 | 'status', |
108 | | - ] |
| 111 | + ], |
109 | 112 | ], |
110 | 113 |
|
111 | 114 | 'controller' => [ |
|
114 | 117 | 'module' => 'Category', |
115 | 118 | ], |
116 | 119 | ], |
117 | | - 'tag' => [ |
| 120 | + 'tag' => [ |
118 | 121 | 'model' => [ |
119 | 122 | 'model' => \Litecms\Blog\Models\Tag::class, |
120 | 123 | 'repository' => \Litecms\Blog\Repositories\Eloquent\TagRepository::class, |
121 | 124 | 'table' => 'blog_tags', |
122 | | - 'hidden'=> [], |
| 125 | + 'hidden' => [], |
123 | 126 | 'visible' => [], |
124 | 127 | 'guarded' => ['*'], |
125 | 128 | 'slugs' => ['slug' => 'name'], |
126 | 129 | 'dates' => ['deleted_at', 'createdat', 'updated_at'], |
127 | 130 | 'appends' => [], |
128 | | - 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], |
| 131 | + 'fillable' => ['id', 'name', 'slug', 'status', 'user_id', 'user_type', 'created_at', 'updated_at', 'deleted_at'], |
129 | 132 | 'translatables' => [], |
130 | 133 | 'upload_folder' => 'blog/tag', |
131 | 134 | 'uploads' => [ |
132 | | - /* |
133 | | - 'images' => [ |
134 | | - 'count' => 10, |
135 | | - 'type' => 'image', |
136 | | - ], |
137 | | - 'file' => [ |
138 | | - 'count' => 1, |
139 | | - 'type' => 'file', |
140 | | - ], |
141 | | - */ |
| 135 | + /* |
| 136 | + 'images' => [ |
| 137 | + 'count' => 10, |
| 138 | + 'type' => 'image', |
| 139 | + ], |
| 140 | + 'file' => [ |
| 141 | + 'count' => 1, |
| 142 | + 'type' => 'file', |
| 143 | + ], |
| 144 | + */ |
142 | 145 | ], |
143 | 146 |
|
144 | 147 | 'casts' => [ |
145 | | - /* |
146 | | - 'images' => 'array', |
147 | | - 'file' => 'array', |
148 | | - */ |
| 148 | + /* |
| 149 | + 'images' => 'array', |
| 150 | + 'file' => 'array', |
| 151 | + */ |
149 | 152 | ], |
150 | 153 |
|
151 | 154 | 'revision' => [], |
152 | 155 | 'perPage' => '20', |
153 | | - 'search' => [ |
154 | | - 'name' => 'like', |
| 156 | + 'search' => [ |
| 157 | + 'name' => 'like', |
155 | 158 | 'status', |
156 | | - ] |
| 159 | + ], |
157 | 160 | ], |
158 | 161 |
|
159 | 162 | 'controller' => [ |
|
0 commit comments