generator-folklore 3.0.5 → 3.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/lib/generators/build/index.js +1 -1
  2. package/lib/generators/eslint/index.js +1 -1
  3. package/lib/generators/intl/index.js +93 -0
  4. package/lib/generators/laravel-mediatheque/index.js +151 -0
  5. package/lib/generators/laravel-mediatheque/instructions/ServiceProvider.php +26 -0
  6. package/lib/generators/laravel-mediatheque/templates/app/Models/Media.php +9 -0
  7. package/lib/generators/laravel-mediatheque/templates/app/Models/MediaFile.php +9 -0
  8. package/lib/generators/laravel-panneau/index.js +89 -28
  9. package/lib/generators/laravel-panneau/instructions/ServiceProvider.php +21 -0
  10. package/lib/generators/laravel-panneau/instructions/config.php +13 -0
  11. package/lib/generators/laravel-panneau/templates/app/Contracts/Repositories/Pages.php +19 -0
  12. package/lib/generators/laravel-panneau/templates/app/Contracts/Resources/Blocks/Image.php +15 -0
  13. package/lib/generators/laravel-panneau/templates/app/Contracts/Resources/Blocks/Text.php +12 -0
  14. package/lib/generators/laravel-panneau/templates/app/Contracts/Resources/Page.php +10 -0
  15. package/lib/generators/laravel-panneau/templates/app/Contracts/Resources/Pages/Home.php +9 -0
  16. package/lib/generators/laravel-panneau/templates/app/Http/Resources/BlockResource.php +37 -0
  17. package/lib/generators/laravel-panneau/templates/app/Http/Resources/BlocksCollection.php +8 -0
  18. package/lib/generators/laravel-panneau/templates/app/Http/Resources/PageResource.php +47 -0
  19. package/lib/generators/laravel-panneau/templates/app/Http/Resources/PagesCollection.php +10 -0
  20. package/lib/generators/laravel-panneau/templates/app/Models/Block.php +4 -13
  21. package/lib/generators/laravel-panneau/templates/app/Models/Page.php +3 -60
  22. package/lib/generators/laravel-panneau/templates/app/Panneau/Composers/AppComposer.php +50 -0
  23. package/lib/generators/laravel-panneau/templates/app/{Schemas → Panneau}/Fields/.gitkeep +0 -0
  24. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Controllers/AccountController.php +41 -0
  25. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Controllers/Controller.php +19 -0
  26. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Controllers/HomeController.php +16 -0
  27. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Controllers/PagesController.php +24 -0
  28. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Controllers/UploadController.php +27 -0
  29. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Controllers/UsersController.php +32 -0
  30. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Requests/AccountUpdateRequest.php +29 -0
  31. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Requests/UploadRequest.php +29 -0
  32. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/BlockResource.php +39 -0
  33. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/BlocksCollection.php +10 -0
  34. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/PageResource.php +56 -0
  35. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/PagesCollection.php +10 -0
  36. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/UserResource.php +24 -0
  37. package/lib/generators/laravel-panneau/templates/app/Panneau/Http/Resources/UsersCollection.php +10 -0
  38. package/lib/generators/laravel-panneau/templates/app/Panneau/PanneauServiceProvider.php +74 -0
  39. package/lib/generators/laravel-panneau/templates/app/Panneau/Policies/PanneauPolicy.php +32 -0
  40. package/lib/generators/laravel-panneau/templates/app/Panneau/Resources/Blocks/ImageBlock.php +30 -0
  41. package/lib/generators/laravel-panneau/templates/app/Panneau/Resources/Blocks/TextBlock.php +28 -0
  42. package/lib/generators/laravel-panneau/templates/app/Panneau/Resources/Blocks.php +45 -0
  43. package/lib/generators/laravel-panneau/templates/app/Panneau/Resources/Pages/Page.php +28 -0
  44. package/lib/generators/laravel-panneau/templates/app/Panneau/Resources/Pages.php +92 -0
  45. package/lib/generators/laravel-panneau/templates/app/Panneau/Resources/Users.php +57 -0
  46. package/lib/generators/laravel-panneau/templates/app/Repositories/Pages.php +42 -0
  47. package/lib/generators/laravel-panneau/templates/app/Resources/Blocks/ImageBlock.php +27 -0
  48. package/lib/generators/laravel-panneau/templates/app/Resources/Blocks/TextBlock.php +19 -0
  49. package/lib/generators/laravel-panneau/templates/app/Resources/Page.php +10 -0
  50. package/lib/generators/laravel-panneau/templates/app/Resources/Pages/HomePage.php +10 -0
  51. package/lib/generators/laravel-panneau/templates/app.blade.php +8 -0
  52. package/lib/generators/laravel-panneau/templates/config.php +29 -0
  53. package/lib/generators/laravel-panneau/templates/index.js +32 -0
  54. package/lib/generators/laravel-panneau/templates/lang/en/panneau.php +66 -0
  55. package/lib/generators/laravel-panneau/templates/lang/fr/panneau.php +66 -0
  56. package/lib/generators/laravel-panneau/templates/layout.blade.php +17 -48
  57. package/lib/generators/laravel-panneau/templates/resources/assets/js/components/Panneau.jsx +68 -0
  58. package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/PageSlug.jsx +68 -0
  59. package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/PageSlugLocalized.jsx +43 -0
  60. package/lib/generators/laravel-panneau/templates/resources/assets/js/components/panneau/fields/index.js +2 -0
  61. package/lib/generators/laravel-panneau/templates/resources/assets/styles/panneau.scss +2 -0
  62. package/lib/generators/laravel-panneau/templates/routes.php +30 -0
  63. package/lib/generators/laravel-project/index.js +519 -0
  64. package/lib/generators/laravel-project/templates/env +41 -0
  65. package/lib/generators/laravel-project/templates/laravel/app/Composers/AppComposer.php +48 -0
  66. package/lib/generators/laravel-project/templates/laravel/app/Composers/IntlComposer.php +10 -0
  67. package/lib/generators/laravel-project/templates/laravel/app/Composers/MetaComposer.php +48 -0
  68. package/lib/generators/laravel-project/templates/laravel/app/Composers/RoutesComposer.php +19 -0
  69. package/lib/generators/laravel-project/templates/laravel/app/Contracts/Repositories/Users.php +17 -0
  70. package/lib/generators/laravel-project/templates/laravel/app/Contracts/Resources/User.php +10 -0
  71. package/lib/generators/laravel-project/templates/laravel/app/Http/Controllers/HomeController.php +18 -0
  72. package/lib/generators/laravel-project/templates/laravel/app/Http/Middleware/TrustProxies.php +28 -0
  73. package/lib/generators/laravel-project/templates/laravel/app/Http/Resources/UserResource.php +21 -0
  74. package/lib/generators/laravel-project/templates/laravel/app/Models/User.php +20 -0
  75. package/lib/generators/laravel-project/templates/laravel/app/Providers/AppServiceProvider.php +120 -0
  76. package/lib/generators/laravel-project/templates/laravel/app/Providers/RouteServiceProvider.php +64 -0
  77. package/lib/generators/laravel-project/templates/laravel/app/Providers/ViewServiceProvider.php +33 -0
  78. package/lib/generators/laravel-project/templates/laravel/app/Repositories/Users.php +37 -0
  79. package/lib/generators/laravel-project/templates/laravel/app/Resources/User.php +11 -0
  80. package/lib/generators/laravel-project/templates/laravel/config/app.php +216 -0
  81. package/lib/generators/laravel-project/templates/laravel/config/auth.php +116 -0
  82. package/lib/generators/laravel-project/templates/laravel/config/image.php +204 -0
  83. package/lib/generators/laravel-project/templates/laravel/config/services.php +39 -0
  84. package/lib/generators/laravel-project/templates/laravel/lang/en/content.php +5 -0
  85. package/lib/generators/laravel-project/templates/laravel/lang/en/errors.php +17 -0
  86. package/lib/generators/laravel-project/templates/laravel/lang/en/meta.php +11 -0
  87. package/lib/generators/laravel-project/templates/laravel/lang/en/routes.php +4 -0
  88. package/lib/generators/laravel-project/templates/laravel/lang/fr/auth.php +19 -0
  89. package/lib/generators/laravel-project/templates/laravel/lang/fr/content.php +5 -0
  90. package/lib/generators/laravel-project/templates/laravel/lang/fr/errors.php +17 -0
  91. package/lib/generators/laravel-project/templates/laravel/lang/fr/meta.php +11 -0
  92. package/lib/generators/laravel-project/templates/laravel/lang/fr/pagination.php +19 -0
  93. package/lib/generators/laravel-project/templates/laravel/lang/fr/passwords.php +22 -0
  94. package/lib/generators/laravel-project/templates/laravel/lang/fr/routes.php +12 -0
  95. package/lib/generators/laravel-project/templates/laravel/lang/fr/validation.php +146 -0
  96. package/lib/generators/laravel-project/templates/laravel/resources/assets/fonts/.gitkeep +0 -0
  97. package/lib/generators/laravel-project/templates/laravel/resources/assets/img/.gitkeep +0 -0
  98. package/lib/generators/laravel-project/templates/laravel/resources/assets/img/folklore.png +0 -0
  99. package/lib/generators/laravel-project/templates/laravel/resources/views/analytics/body.blade.php +3 -0
  100. package/lib/generators/laravel-project/templates/laravel/resources/views/analytics/gpt.blade.php +16 -0
  101. package/lib/generators/laravel-project/templates/laravel/resources/views/analytics/head.blade.php +1 -0
  102. package/lib/generators/laravel-project/templates/laravel/resources/views/app.blade.php +8 -0
  103. package/lib/generators/laravel-project/templates/laravel/resources/views/errors/401.blade.php +8 -0
  104. package/lib/generators/laravel-project/templates/laravel/resources/views/errors/403.blade.php +8 -0
  105. package/lib/generators/laravel-project/templates/laravel/resources/views/errors/404.blade.php +8 -0
  106. package/lib/generators/laravel-project/templates/laravel/resources/views/errors/500.blade.php +8 -0
  107. package/lib/generators/laravel-project/templates/laravel/resources/views/layout.blade.php +33 -0
  108. package/lib/generators/laravel-project/templates/laravel/resources/views/meta/all.blade.php +4 -0
  109. package/lib/generators/laravel-project/templates/laravel/resources/views/meta/base.blade.php +11 -0
  110. package/lib/generators/laravel-project/templates/laravel/resources/views/meta/facebook.blade.php +4 -0
  111. package/lib/generators/laravel-project/templates/laravel/resources/views/meta/opengraph.blade.php +9 -0
  112. package/lib/generators/laravel-project/templates/laravel/resources/views/meta/twitter.blade.php +5 -0
  113. package/lib/generators/laravel-project/templates/laravel/routes/web.php +12 -0
  114. package/lib/generators/prettier/index.js +1 -1
  115. package/lib/generators/react-app/index.js +2 -2
  116. package/lib/generators/react-app/templates/src/components/App.jsx +3 -2
  117. package/lib/generators/react-app/templates/src/components/pages/Error.jsx +2 -2
  118. package/lib/generators/stylelint/index.js +1 -1
  119. package/lib/lib/generator.js +9 -0
  120. package/package.json +5 -4
  121. package/lib/generators/laravel-panneau/templates/_composer.json +0 -6
  122. package/lib/generators/laravel-panneau/templates/_package.json +0 -11
  123. package/lib/generators/laravel-panneau/templates/app/Http/Controllers/Panneau/HomeController.php +0 -14
  124. package/lib/generators/laravel-panneau/templates/app/Http/Controllers/Panneau/PagesController.php +0 -11
  125. package/lib/generators/laravel-panneau/templates/app/Models/Mediatheque/File.php +0 -13
  126. package/lib/generators/laravel-panneau/templates/app/Models/Mediatheque/Picture.php +0 -13
  127. package/lib/generators/laravel-panneau/templates/app/Models/Mediatheque/Video.php +0 -34
  128. package/lib/generators/laravel-panneau/templates/app/Providers/PanneauServiceProvider.php +0 -23
  129. package/lib/generators/laravel-panneau/templates/app/Reducers/SlugExtractReducer.php +0 -18
  130. package/lib/generators/laravel-panneau/templates/app/Resources/Pages.php +0 -54
  131. package/lib/generators/laravel-panneau/templates/app/Schemas/Blocks/Base.php +0 -22
  132. package/lib/generators/laravel-panneau/templates/app/Schemas/Bubbles/Base.php +0 -22
  133. package/lib/generators/laravel-panneau/templates/app/Schemas/Pages/Base.php +0 -36
  134. package/lib/generators/laravel-panneau/templates/resources/lang/en/panneau.php +0 -12
  135. package/lib/generators/laravel-panneau/templates/resources/lang/fr/panneau.php +0 -12
@@ -0,0 +1,10 @@
1
+ <?php
2
+
3
+ namespace App\Contracts\Resources;
4
+
5
+ use Folklore\Contracts\Resources\User as BaseUser;
6
+
7
+ interface User extends BaseUser
8
+ {
9
+
10
+ }
@@ -0,0 +1,18 @@
1
+ <?php
2
+
3
+ namespace App\Http\Controllers;
4
+
5
+ use Illuminate\Http\Request;
6
+
7
+ class HomeController extends Controller
8
+ {
9
+ public function index(Request $request)
10
+ {
11
+ return view('app');
12
+ }
13
+
14
+ public function redirect(Request $request)
15
+ {
16
+ return redirect()->to(app('url')->routeWithLocale('home'));
17
+ }
18
+ }
@@ -0,0 +1,28 @@
1
+ <?php
2
+
3
+ namespace App\Http\Middleware;
4
+
5
+ use Illuminate\Http\Middleware\TrustProxies as Middleware;
6
+ use Illuminate\Http\Request;
7
+
8
+ class TrustProxies extends Middleware
9
+ {
10
+ /**
11
+ * The trusted proxies for this application.
12
+ *
13
+ * @var array<int, string>|string|null
14
+ */
15
+ protected $proxies = '*';
16
+
17
+ /**
18
+ * The headers that should be used to detect proxies.
19
+ *
20
+ * @var int
21
+ */
22
+ protected $headers =
23
+ Request::HEADER_X_FORWARDED_FOR |
24
+ Request::HEADER_X_FORWARDED_HOST |
25
+ Request::HEADER_X_FORWARDED_PORT |
26
+ Request::HEADER_X_FORWARDED_PROTO |
27
+ Request::HEADER_X_FORWARDED_AWS_ELB;
28
+ }
@@ -0,0 +1,21 @@
1
+ <?php
2
+
3
+ namespace App\Http\Resources;
4
+
5
+ use Illuminate\Http\Resources\Json\JsonResource;
6
+
7
+ class UserResource extends JsonResource
8
+ {
9
+ /**
10
+ * Transform the resource into an array.
11
+ *
12
+ * @param \Illuminate\Http\Request $request
13
+ * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
14
+ */
15
+ public function toArray($request)
16
+ {
17
+ return [
18
+ 'id' => $this->id(),
19
+ ];
20
+ }
21
+ }
@@ -0,0 +1,20 @@
1
+ <?php
2
+
3
+ namespace App\Models;
4
+
5
+ // use Illuminate\Contracts\Auth\MustVerifyEmail;
6
+ use Folklore\Models\User as BaseUser;
7
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
8
+ use Laravel\Sanctum\HasApiTokens;
9
+ use App\Contracts\Resources\User as UserContract;
10
+ use App\Resources\User as UserResource;
11
+
12
+ class User extends BaseUser
13
+ {
14
+ use HasApiTokens, HasFactory;
15
+
16
+ public function toResource(): UserContract
17
+ {
18
+ return new UserResource($this);
19
+ }
20
+ }
@@ -0,0 +1,120 @@
1
+ <?php
2
+
3
+ namespace App\Providers;
4
+
5
+ use Illuminate\Support\ServiceProvider;
6
+ use Illuminate\Support\Facades\Schema;
7
+ use Illuminate\Http\Resources\Json\JsonResource;
8
+ use Illuminate\Http\Request;
9
+ use Illuminate\Support\Arr;
10
+
11
+ class AppServiceProvider extends ServiceProvider
12
+ {
13
+ /**
14
+ * Register any application services.
15
+ *
16
+ * @return void
17
+ */
18
+ public function register()
19
+ {
20
+ $this->registerRepositories();<% if (options.mediatheque) { %>
21
+ $this->registerMediatheque();<% } %>
22
+ $this->registerTelescope();
23
+ }
24
+
25
+ protected function registerRepositories()
26
+ {
27
+ $this->app->bind(
28
+ \Folklore\Contracts\Repositories\Users::class,
29
+ \App\Repositories\Users::class
30
+ );
31
+
32
+ $this->app->bind(
33
+ \App\Contracts\Repositories\Users::class,
34
+ \App\Repositories\Users::class
35
+ );<% if (options.panneau) { %>
36
+
37
+ $this->app->bind(
38
+ \Folklore\Contracts\Repositories\Pages::class,
39
+ \App\Repositories\Pages::class
40
+ );
41
+
42
+ $this->app->bind(
43
+ \App\Contracts\Repositories\Pages::class,
44
+ \App\Repositories\Pages::class
45
+ );<% } %>
46
+ }<% if (options.mediatheque) { %>
47
+
48
+ protected function registerMediatheque()
49
+ {
50
+ $this->app->bind(
51
+ \Folklore\Mediatheque\Contracts\Models\Media::class,
52
+ \App\Models\Media::class
53
+ );
54
+
55
+ $this->app->bind(
56
+ \Folklore\Mediatheque\Contracts\Models\File::class,
57
+ \App\Models\MediaFile::class
58
+ );
59
+ }<% } %>
60
+
61
+ protected function registerTelescope()
62
+ {
63
+ if ($this->app->environment('local')) {
64
+ $this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
65
+ $this->app->register(TelescopeServiceProvider::class);
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Bootstrap any application services.
71
+ *
72
+ * @return void
73
+ */
74
+ public function boot()
75
+ {
76
+ // Some defaults
77
+ Schema::defaultStringLength(191);
78
+ JsonResource::withoutWrapping();
79
+
80
+ $this->bootRequest();
81
+
82
+ $this->bootImage();
83
+ }
84
+
85
+ protected function bootRequest()
86
+ {
87
+ // Determine site from request
88
+ Request::macro('site', function () {
89
+ return null;
90
+ });
91
+ }
92
+
93
+ protected function bootImage()
94
+ {
95
+ foreach (config('image.sizes') as $filter) {
96
+ $id = $filter['id'];
97
+ $data = Arr::except($filter, ['id']);
98
+ if (sizeof($data) === 0) {
99
+ continue;
100
+ }
101
+ $newFilter = [];
102
+ if (isset($filter['maxWidth'])) {
103
+ $newFilter['width'] = $filter['maxWidth'];
104
+ }
105
+ if (isset($filter['maxHeight'])) {
106
+ $newFilter['height'] = $filter['maxHeight'];
107
+ }
108
+ if (isset($filter['width'])) {
109
+ $newFilter['width'] = $filter['width'];
110
+ }
111
+ if (isset($filter['height'])) {
112
+ $newFilter['height'] = $filter['height'];
113
+ }
114
+ if (isset($filter['width']) && isset($filter['height'])) {
115
+ $newFilter['crop'] = true;
116
+ }
117
+ $this->app['image']->filter($id, $newFilter);
118
+ }
119
+ }
120
+ }
@@ -0,0 +1,64 @@
1
+ <?php
2
+
3
+ namespace App\Providers;
4
+
5
+ use Illuminate\Cache\RateLimiting\Limit;
6
+ use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
7
+ use Illuminate\Http\Request;
8
+ use Illuminate\Support\Facades\RateLimiter;
9
+ use Illuminate\Support\Facades\Route;
10
+
11
+ class RouteServiceProvider extends ServiceProvider
12
+ {
13
+ /**
14
+ * The path to the "home" route for your application.
15
+ *
16
+ * Typically, users are redirected here after authentication.
17
+ *
18
+ * @var string
19
+ */
20
+ public const HOME = '/home';
21
+
22
+ /**
23
+ * Define your route model bindings, pattern filters, and other route configuration.
24
+ *
25
+ * @return void
26
+ */
27
+ public function boot()
28
+ {
29
+ $this->configureRateLimiting();
30
+
31
+ $this->bootPatterns();
32
+
33
+ $this->bootBindings();
34
+
35
+ $this->routes(function () {
36
+ Route::middleware('api')
37
+ ->prefix('api')
38
+ ->group(base_path('routes/api.php'));
39
+
40
+ Route::middleware('web')
41
+ ->group(base_path('routes/web.php'));
42
+ });
43
+ }
44
+
45
+ /**
46
+ * Configure the rate limiters for the application.
47
+ *
48
+ * @return void
49
+ */
50
+ protected function configureRateLimiting()
51
+ {
52
+ RateLimiter::for('api', function (Request $request) {
53
+ return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
54
+ });
55
+ }
56
+
57
+ protected function bootPatterns()
58
+ {
59
+ }
60
+
61
+ protected function bootBindings()
62
+ {
63
+ }
64
+ }
@@ -0,0 +1,33 @@
1
+ <?php
2
+
3
+ namespace App\Providers;
4
+
5
+ use Illuminate\Support\ServiceProvider;
6
+ use Illuminate\Contracts\View\Factory as ViewFactory;
7
+
8
+ class ViewServiceProvider extends ServiceProvider
9
+ {
10
+ /**
11
+ * Register any application services.
12
+ *
13
+ * @return void
14
+ */
15
+ public function register()
16
+ {
17
+ //
18
+ }
19
+
20
+ /**
21
+ * Bootstrap any application services.
22
+ *
23
+ * @return void
24
+ */
25
+ public function boot()
26
+ {
27
+ $view = $this->app[ViewFactory::class];
28
+ $view->composer('app', \App\Composers\IntlComposer::class);
29
+ $view->composer('app', \App\Composers\RoutesComposer::class);
30
+ $view->composer('app', \App\Composers\AppComposer::class);
31
+ $view->composer('meta.*', \App\Composers\MetaComposer::class);
32
+ }
33
+ }
@@ -0,0 +1,37 @@
1
+ <?php
2
+
3
+ namespace App\Repositories;
4
+
5
+ use Folklore\Repositories\Users as BaseUsers;
6
+ use App\Contracts\Repositories\Users as UsersContract;
7
+ use Illuminate\Database\Eloquent\Model;
8
+ use App\Models\User as UserModel;
9
+ use App\Contracts\Resources\User as UserContract;
10
+
11
+ class Users extends BaseUsers implements UsersContract
12
+ {
13
+ protected function newModel(): Model
14
+ {
15
+ return new UserModel();
16
+ }
17
+
18
+ public function findById(string $id): ?UserContract
19
+ {
20
+ return parent::findById($id);
21
+ }
22
+
23
+ public function findByEmail(string $email): ?UserContract
24
+ {
25
+ return parent::findByEmail($email);
26
+ }
27
+
28
+ public function create($data): UserContract
29
+ {
30
+ return parent::create($data);
31
+ }
32
+
33
+ public function update(string $id, $data): ?UserContract
34
+ {
35
+ return parent::update($id, $data);
36
+ }
37
+ }
@@ -0,0 +1,11 @@
1
+ <?php
2
+
3
+ namespace App\Resources;
4
+
5
+ use Folklore\Resources\User as BaseUser;
6
+ use App\Contracts\Resources\User as UserContract;
7
+
8
+ class User extends BaseUser implements UserContract
9
+ {
10
+
11
+ }
@@ -0,0 +1,216 @@
1
+ <?php
2
+
3
+ use Illuminate\Support\Facades\Facade;
4
+
5
+ return [
6
+
7
+ /*
8
+ |--------------------------------------------------------------------------
9
+ | Application Name
10
+ |--------------------------------------------------------------------------
11
+ |
12
+ | This value is the name of your application. This value is used when the
13
+ | framework needs to place the application's name in a notification or
14
+ | any other location as required by the application or its packages.
15
+ |
16
+ */
17
+
18
+ 'name' => env('APP_NAME', '<%= options.project_name %>'),
19
+
20
+ /*
21
+ |--------------------------------------------------------------------------
22
+ | Application Environment
23
+ |--------------------------------------------------------------------------
24
+ |
25
+ | This value determines the "environment" your application is currently
26
+ | running in. This may determine how you prefer to configure various
27
+ | services the application utilizes. Set this in your ".env" file.
28
+ |
29
+ */
30
+
31
+ 'env' => env('APP_ENV', 'production'),
32
+
33
+ /*
34
+ |--------------------------------------------------------------------------
35
+ | Application Debug Mode
36
+ |--------------------------------------------------------------------------
37
+ |
38
+ | When your application is in debug mode, detailed error messages with
39
+ | stack traces will be shown on every error that occurs within your
40
+ | application. If disabled, a simple generic error page is shown.
41
+ |
42
+ */
43
+
44
+ 'debug' => (bool) env('APP_DEBUG', false),
45
+
46
+ /*
47
+ |--------------------------------------------------------------------------
48
+ | Application URL
49
+ |--------------------------------------------------------------------------
50
+ |
51
+ | This URL is used by the console to properly generate URLs when using
52
+ | the Artisan command line tool. You should set this to the root of
53
+ | your application so that it is used when running Artisan tasks.
54
+ |
55
+ */
56
+
57
+ 'url' => env('APP_URL', '<%= options.project_url %>'),
58
+
59
+ 'asset_url' => env('ASSET_URL'),
60
+
61
+ /*
62
+ |--------------------------------------------------------------------------
63
+ | Application Timezone
64
+ |--------------------------------------------------------------------------
65
+ |
66
+ | Here you may specify the default timezone for your application, which
67
+ | will be used by the PHP date and date-time functions. We have gone
68
+ | ahead and set this to a sensible default for you out of the box.
69
+ |
70
+ */
71
+
72
+ 'timezone' => 'America/Montreal',
73
+
74
+ /*
75
+ |--------------------------------------------------------------------------
76
+ | Application Locale Configuration
77
+ |--------------------------------------------------------------------------
78
+ |
79
+ | The application locale determines the default locale that will be used
80
+ | by the translation service provider. You are free to set this value
81
+ | to any of the locales which will be supported by the application.
82
+ |
83
+ */
84
+
85
+ 'locale' => 'en',
86
+
87
+ /*
88
+ |--------------------------------------------------------------------------
89
+ | Application Fallback Locale
90
+ |--------------------------------------------------------------------------
91
+ |
92
+ | The fallback locale determines the locale to use when the current one
93
+ | is not available. You may change the value to correspond to any of
94
+ | the language folders that are provided through your application.
95
+ |
96
+ */
97
+
98
+ 'fallback_locale' => 'en',
99
+
100
+ /*
101
+ |--------------------------------------------------------------------------
102
+ | Faker Locale
103
+ |--------------------------------------------------------------------------
104
+ |
105
+ | This locale will be used by the Faker PHP library when generating fake
106
+ | data for your database seeds. For example, this will be used to get
107
+ | localized telephone numbers, street address information and more.
108
+ |
109
+ */
110
+
111
+ 'faker_locale' => 'en_US',
112
+
113
+ /*
114
+ |--------------------------------------------------------------------------
115
+ | Encryption Key
116
+ |--------------------------------------------------------------------------
117
+ |
118
+ | This key is used by the Illuminate encrypter service and should be set
119
+ | to a random, 32 character string, otherwise these encrypted strings
120
+ | will not be safe. Please do this before deploying an application!
121
+ |
122
+ */
123
+
124
+ 'key' => env('APP_KEY'),
125
+
126
+ 'cipher' => 'AES-256-CBC',
127
+
128
+ /*
129
+ |--------------------------------------------------------------------------
130
+ | Maintenance Mode Driver
131
+ |--------------------------------------------------------------------------
132
+ |
133
+ | These configuration options determine the driver used to determine and
134
+ | manage Laravel's "maintenance mode" status. The "cache" driver will
135
+ | allow maintenance mode to be controlled across multiple machines.
136
+ |
137
+ | Supported drivers: "file", "cache"
138
+ |
139
+ */
140
+
141
+ 'maintenance' => [
142
+ 'driver' => 'file',
143
+ // 'store' => 'redis',
144
+ ],
145
+
146
+ /*
147
+ |--------------------------------------------------------------------------
148
+ | Autoloaded Service Providers
149
+ |--------------------------------------------------------------------------
150
+ |
151
+ | The service providers listed here will be automatically loaded on the
152
+ | request to your application. Feel free to add your own services to
153
+ | this array to grant expanded functionality to your applications.
154
+ |
155
+ */
156
+
157
+ 'providers' => [
158
+
159
+ /*
160
+ * Laravel Framework Service Providers...
161
+ */
162
+ Illuminate\Auth\AuthServiceProvider::class,
163
+ Illuminate\Broadcasting\BroadcastServiceProvider::class,
164
+ Illuminate\Bus\BusServiceProvider::class,
165
+ Illuminate\Cache\CacheServiceProvider::class,
166
+ Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
167
+ Illuminate\Cookie\CookieServiceProvider::class,
168
+ Illuminate\Database\DatabaseServiceProvider::class,
169
+ Illuminate\Encryption\EncryptionServiceProvider::class,
170
+ Illuminate\Filesystem\FilesystemServiceProvider::class,
171
+ Illuminate\Foundation\Providers\FoundationServiceProvider::class,
172
+ Illuminate\Hashing\HashServiceProvider::class,
173
+ Illuminate\Mail\MailServiceProvider::class,
174
+ Illuminate\Notifications\NotificationServiceProvider::class,
175
+ Illuminate\Pagination\PaginationServiceProvider::class,
176
+ Illuminate\Pipeline\PipelineServiceProvider::class,
177
+ Illuminate\Queue\QueueServiceProvider::class,
178
+ Illuminate\Redis\RedisServiceProvider::class,
179
+ Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
180
+ Illuminate\Session\SessionServiceProvider::class,
181
+ Illuminate\Translation\TranslationServiceProvider::class,
182
+ Illuminate\Validation\ValidationServiceProvider::class,
183
+ Illuminate\View\ViewServiceProvider::class,
184
+
185
+ /*
186
+ * Package Service Providers...
187
+ */
188
+
189
+ /*
190
+ * Application Service Providers...
191
+ */
192
+ App\Providers\AppServiceProvider::class,
193
+ App\Providers\AuthServiceProvider::class,
194
+ // App\Providers\BroadcastServiceProvider::class,
195
+ App\Providers\EventServiceProvider::class,
196
+ App\Providers\RouteServiceProvider::class,
197
+ App\Providers\ViewServiceProvider::class,<% if (options.panneau) { %>
198
+ App\Panneau\PanneauServiceProvider::class,<% } %>
199
+ ],
200
+
201
+ /*
202
+ |--------------------------------------------------------------------------
203
+ | Class Aliases
204
+ |--------------------------------------------------------------------------
205
+ |
206
+ | This array of class aliases will be registered when this application
207
+ | is started. However, feel free to register as many as you wish as
208
+ | the aliases are "lazy" loaded so they don't hinder performance.
209
+ |
210
+ */
211
+
212
+ 'aliases' => Facade::defaultAliases()->merge([
213
+ // 'ExampleClass' => App\Example\ExampleClass::class,
214
+ ])->toArray(),
215
+
216
+ ];