125 |
126 |
127 |
128 |
129 | @stack('scripts')
130 |
131 |
134 |
135 |
136 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | env('SESSION_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Session Lifetime
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may specify the number of minutes that you wish the session
29 | | to be allowed to remain idle before it expires. If you want them
30 | | to immediately expire on the browser closing, set that option.
31 | |
32 | */
33 |
34 | 'lifetime' => env('SESSION_LIFETIME', 120),
35 |
36 | 'expire_on_close' => false,
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Session Encryption
41 | |--------------------------------------------------------------------------
42 | |
43 | | This option allows you to easily specify that all of your session data
44 | | should be encrypted before it is stored. All encryption will be run
45 | | automatically by Laravel and you can use the Session like normal.
46 | |
47 | */
48 |
49 | 'encrypt' => false,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Session File Location
54 | |--------------------------------------------------------------------------
55 | |
56 | | When using the native session driver, we need a location where session
57 | | files may be stored. A default has been set for you but a different
58 | | location may be specified. This is only needed for file sessions.
59 | |
60 | */
61 |
62 | 'files' => storage_path('framework/sessions'),
63 |
64 | /*
65 | |--------------------------------------------------------------------------
66 | | Session Database Connection
67 | |--------------------------------------------------------------------------
68 | |
69 | | When using the "database" or "redis" session drivers, you may specify a
70 | | connection that should be used to manage these sessions. This should
71 | | correspond to a connection in your database configuration options.
72 | |
73 | */
74 |
75 | 'connection' => env('SESSION_CONNECTION', null),
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Session Database Table
80 | |--------------------------------------------------------------------------
81 | |
82 | | When using the "database" session driver, you may specify the table we
83 | | should use to manage the sessions. Of course, a sensible default is
84 | | provided for you; however, you are free to change this as needed.
85 | |
86 | */
87 |
88 | 'table' => 'sessions',
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Session Cache Store
93 | |--------------------------------------------------------------------------
94 | |
95 | | When using the "apc", "memcached", or "dynamodb" session drivers you may
96 | | list a cache store that should be used for these sessions. This value
97 | | must match with one of the application's configured cache "stores".
98 | |
99 | */
100 |
101 | 'store' => env('SESSION_STORE', null),
102 |
103 | /*
104 | |--------------------------------------------------------------------------
105 | | Session Sweeping Lottery
106 | |--------------------------------------------------------------------------
107 | |
108 | | Some session drivers must manually sweep their storage location to get
109 | | rid of old sessions from storage. Here are the chances that it will
110 | | happen on a given request. By default, the odds are 2 out of 100.
111 | |
112 | */
113 |
114 | 'lottery' => [2, 100],
115 |
116 | /*
117 | |--------------------------------------------------------------------------
118 | | Session Cookie Name
119 | |--------------------------------------------------------------------------
120 | |
121 | | Here you may change the name of the cookie used to identify a session
122 | | instance by ID. The name specified here will get used every time a
123 | | new session cookie is created by the framework for every driver.
124 | |
125 | */
126 |
127 | 'cookie' => env(
128 | 'SESSION_COOKIE',
129 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
130 | ),
131 |
132 | /*
133 | |--------------------------------------------------------------------------
134 | | Session Cookie Path
135 | |--------------------------------------------------------------------------
136 | |
137 | | The session cookie path determines the path for which the cookie will
138 | | be regarded as available. Typically, this will be the root path of
139 | | your application but you are free to change this when necessary.
140 | |
141 | */
142 |
143 | 'path' => '/',
144 |
145 | /*
146 | |--------------------------------------------------------------------------
147 | | Session Cookie Domain
148 | |--------------------------------------------------------------------------
149 | |
150 | | Here you may change the domain of the cookie used to identify a session
151 | | in your application. This will determine which domains the cookie is
152 | | available to in your application. A sensible default has been set.
153 | |
154 | */
155 |
156 | 'domain' => env('SESSION_DOMAIN', null),
157 |
158 | /*
159 | |--------------------------------------------------------------------------
160 | | HTTPS Only Cookies
161 | |--------------------------------------------------------------------------
162 | |
163 | | By setting this option to true, session cookies will only be sent back
164 | | to the server if the browser has a HTTPS connection. This will keep
165 | | the cookie from being sent to you if it can not be done securely.
166 | |
167 | */
168 |
169 | 'secure' => env('SESSION_SECURE_COOKIE', false),
170 |
171 | /*
172 | |--------------------------------------------------------------------------
173 | | HTTP Access Only
174 | |--------------------------------------------------------------------------
175 | |
176 | | Setting this value to true will prevent JavaScript from accessing the
177 | | value of the cookie and the cookie will only be accessible through
178 | | the HTTP protocol. You are free to modify this option if needed.
179 | |
180 | */
181 |
182 | 'http_only' => true,
183 |
184 | /*
185 | |--------------------------------------------------------------------------
186 | | Same-Site Cookies
187 | |--------------------------------------------------------------------------
188 | |
189 | | This option determines how your cookies behave when cross-site requests
190 | | take place, and can be used to mitigate CSRF attacks. By default, we
191 | | do not enable this as other CSRF protection services are in place.
192 | |
193 | | Supported: "lax", "strict"
194 | |
195 | */
196 |
197 | 'same_site' => null,
198 |
199 | ];
200 |
--------------------------------------------------------------------------------
/resources/lang/en/validation.php:
--------------------------------------------------------------------------------
1 | 'The :attribute must be accepted.',
17 | 'active_url' => 'The :attribute is not a valid URL.',
18 | 'after' => 'The :attribute must be a date after :date.',
19 | 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
20 | 'alpha' => 'The :attribute may only contain letters.',
21 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
22 | 'alpha_num' => 'The :attribute may only contain letters and numbers.',
23 | 'array' => 'The :attribute must be an array.',
24 | 'before' => 'The :attribute must be a date before :date.',
25 | 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
26 | 'between' => [
27 | 'numeric' => 'The :attribute must be between :min and :max.',
28 | 'file' => 'The :attribute must be between :min and :max kilobytes.',
29 | 'string' => 'The :attribute must be between :min and :max characters.',
30 | 'array' => 'The :attribute must have between :min and :max items.',
31 | ],
32 | 'boolean' => 'The :attribute field must be true or false.',
33 | 'confirmed' => 'The :attribute confirmation does not match.',
34 | 'date' => 'The :attribute is not a valid date.',
35 | 'date_equals' => 'The :attribute must be a date equal to :date.',
36 | 'date_format' => 'The :attribute does not match the format :format.',
37 | 'different' => 'The :attribute and :other must be different.',
38 | 'digits' => 'The :attribute must be :digits digits.',
39 | 'digits_between' => 'The :attribute must be between :min and :max digits.',
40 | 'dimensions' => 'The :attribute has invalid image dimensions.',
41 | 'distinct' => 'The :attribute field has a duplicate value.',
42 | 'email' => 'The :attribute must be a valid email address.',
43 | 'ends_with' => 'The :attribute must end with one of the following: :values',
44 | 'exists' => 'The selected :attribute is invalid.',
45 | 'file' => 'The :attribute must be a file.',
46 | 'filled' => 'The :attribute field must have a value.',
47 | 'gt' => [
48 | 'numeric' => 'The :attribute must be greater than :value.',
49 | 'file' => 'The :attribute must be greater than :value kilobytes.',
50 | 'string' => 'The :attribute must be greater than :value characters.',
51 | 'array' => 'The :attribute must have more than :value items.',
52 | ],
53 | 'gte' => [
54 | 'numeric' => 'The :attribute must be greater than or equal :value.',
55 | 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
56 | 'string' => 'The :attribute must be greater than or equal :value characters.',
57 | 'array' => 'The :attribute must have :value items or more.',
58 | ],
59 | 'image' => 'The :attribute must be an image.',
60 | 'in' => 'The selected :attribute is invalid.',
61 | 'in_array' => 'The :attribute field does not exist in :other.',
62 | 'integer' => 'The :attribute must be an integer.',
63 | 'ip' => 'The :attribute must be a valid IP address.',
64 | 'ipv4' => 'The :attribute must be a valid IPv4 address.',
65 | 'ipv6' => 'The :attribute must be a valid IPv6 address.',
66 | 'json' => 'The :attribute must be a valid JSON string.',
67 | 'lt' => [
68 | 'numeric' => 'The :attribute must be less than :value.',
69 | 'file' => 'The :attribute must be less than :value kilobytes.',
70 | 'string' => 'The :attribute must be less than :value characters.',
71 | 'array' => 'The :attribute must have less than :value items.',
72 | ],
73 | 'lte' => [
74 | 'numeric' => 'The :attribute must be less than or equal :value.',
75 | 'file' => 'The :attribute must be less than or equal :value kilobytes.',
76 | 'string' => 'The :attribute must be less than or equal :value characters.',
77 | 'array' => 'The :attribute must not have more than :value items.',
78 | ],
79 | 'max' => [
80 | 'numeric' => 'The :attribute may not be greater than :max.',
81 | 'file' => 'The :attribute may not be greater than :max kilobytes.',
82 | 'string' => 'The :attribute may not be greater than :max characters.',
83 | 'array' => 'The :attribute may not have more than :max items.',
84 | ],
85 | 'mimes' => 'The :attribute must be a file of type: :values.',
86 | 'mimetypes' => 'The :attribute must be a file of type: :values.',
87 | 'min' => [
88 | 'numeric' => 'The :attribute must be at least :min.',
89 | 'file' => 'The :attribute must be at least :min kilobytes.',
90 | 'string' => 'The :attribute must be at least :min characters.',
91 | 'array' => 'The :attribute must have at least :min items.',
92 | ],
93 | 'not_in' => 'The selected :attribute is invalid.',
94 | 'not_regex' => 'The :attribute format is invalid.',
95 | 'numeric' => 'The :attribute must be a number.',
96 | 'present' => 'The :attribute field must be present.',
97 | 'regex' => 'The :attribute format is invalid.',
98 | 'required' => 'The :attribute field is required.',
99 | 'required_if' => 'The :attribute field is required when :other is :value.',
100 | 'required_unless' => 'The :attribute field is required unless :other is in :values.',
101 | 'required_with' => 'The :attribute field is required when :values is present.',
102 | 'required_with_all' => 'The :attribute field is required when :values are present.',
103 | 'required_without' => 'The :attribute field is required when :values is not present.',
104 | 'required_without_all' => 'The :attribute field is required when none of :values are present.',
105 | 'same' => 'The :attribute and :other must match.',
106 | 'size' => [
107 | 'numeric' => 'The :attribute must be :size.',
108 | 'file' => 'The :attribute must be :size kilobytes.',
109 | 'string' => 'The :attribute must be :size characters.',
110 | 'array' => 'The :attribute must contain :size items.',
111 | ],
112 | 'starts_with' => 'The :attribute must start with one of the following: :values',
113 | 'string' => 'The :attribute must be a string.',
114 | 'timezone' => 'The :attribute must be a valid zone.',
115 | 'unique' => 'The :attribute has already been taken.',
116 | 'uploaded' => 'The :attribute failed to upload.',
117 | 'url' => 'The :attribute format is invalid.',
118 | 'uuid' => 'The :attribute must be a valid UUID.',
119 |
120 | /*
121 | |--------------------------------------------------------------------------
122 | | Custom Validation Language Lines
123 | |--------------------------------------------------------------------------
124 | |
125 | | Here you may specify custom validation messages for attributes using the
126 | | convention "attribute.rule" to name the lines. This makes it quick to
127 | | specify a specific custom language line for a given attribute rule.
128 | |
129 | */
130 |
131 | 'custom' => [
132 | 'attribute-name' => [
133 | 'rule-name' => 'custom-message',
134 | ],
135 | ],
136 |
137 | /*
138 | |--------------------------------------------------------------------------
139 | | Custom Validation Attributes
140 | |--------------------------------------------------------------------------
141 | |
142 | | The following language lines are used to swap our attribute placeholder
143 | | with something more reader friendly such as "E-Mail Address" instead
144 | | of "email". This simply helps us make our message more expressive.
145 | |
146 | */
147 |
148 | 'attributes' => [],
149 |
150 | ];
151 |
--------------------------------------------------------------------------------
/app/Http/Controllers/ImageController.php:
--------------------------------------------------------------------------------
1 | first();
26 | if ($image) {
27 | $image->update([
28 | 'views' => $image->views + 1
29 | ]);
30 |
31 | $fileName = $image->save_name;
32 | if ($this->fetchImageFromRemote($fileName)) {
33 | $imagePath = storage_path(
34 | 'app' . DIRECTORY_SEPARATOR . $this->getLocalStoragePath($fileName)
35 | );
36 | }
37 | }
38 |
39 | return response()->file($imagePath);
40 | }
41 |
42 |
43 | /**
44 | * Delete image
45 | *
46 | * @param $deleteCode
47 | * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response
48 | * @throws Exception
49 | */
50 | public function destroy($deleteCode)
51 | {
52 | $image = Image::where('delete_code', $deleteCode)->first();
53 | if ($image) {
54 | $sameImageCount = Image::where('save_name', $image->save_name)->count();
55 | if ($sameImageCount > 1) {
56 | // just delete record
57 | $image->delete();
58 | return response('OK');
59 | } else {
60 | if (Storage::disk('local')->delete($this->getLocalStoragePath($image->save_name))
61 | && Storage::disk('minio')->delete($this->getRemoteStoragePath($image->save_name))) {
62 | // delete image and database record
63 | $image->delete();
64 | return response('OK');
65 | }
66 | }
67 | }
68 |
69 | return response('404');
70 | }
71 |
72 | public function create(Request $request)
73 | {
74 | $saveResult = '';
75 |
76 | if ($request->hasFile('image')) {
77 | $imageFile = $request->file('image');
78 |
79 | $extraOptions = [
80 | 'nsfw' => $request->input('nsfw') === 'true' || $request->input('nsfw') === true ? true : false,
81 | 'uploader_ip' => $request->ip(),
82 | ];
83 |
84 | $saveResult = $this->saveSingleImage($imageFile, $extraOptions);
85 | }
86 |
87 | return response()->json([
88 | 'success' => !empty($saveResult) ? true : false,
89 | 'data' => $saveResult,
90 | ]);
91 | }
92 |
93 | private function validateImageFile($imageFile)
94 | {
95 | return $imageFile->getClientSize() < 5 * 1024 * 1024
96 | && in_array($imageFile->extension(), ['jpg', 'jpeg', 'gif', 'png']);
97 | }
98 |
99 | /**
100 | * Generate code
101 | *
102 | * @param int $length Code length
103 | * @param bool $check If check unique
104 | * @return string Result Code
105 | */
106 | private function generateCode($length = 5, $check = false)
107 | {
108 | do {
109 | $code = strtoupper(Str::random($length));
110 |
111 | $duplicate = $check
112 | ? (Image::where('code', $code)->first() ? true : false)
113 | : false;
114 | } while ($check && $duplicate);
115 |
116 | return $code;
117 | }
118 |
119 | /**
120 | * Construct file's local relative path at storage's app directory
121 | *
122 | * @param string $fileName File Name
123 | * @return string Path
124 | */
125 | private function getLocalStoragePath($fileName = '')
126 | {
127 | $bashPath = 'public' . DIRECTORY_SEPARATOR . 'cache';
128 | return $fileName ? ($bashPath . DIRECTORY_SEPARATOR . $fileName) : $bashPath;
129 | }
130 |
131 | /**
132 | * Construct file's remote relative path in bucket
133 | *
134 | * @param string $fileName File Name
135 | * @return string Path
136 | */
137 | private function getRemoteStoragePath($fileName = '')
138 | {
139 | $bashPath = 'upload' . DIRECTORY_SEPARATOR . 'images';
140 | return $fileName ? ($bashPath . DIRECTORY_SEPARATOR . $fileName) : $bashPath;
141 | }
142 |
143 | /**
144 | * Try to fetch remote image from BackBlaze if file does not exist
145 | *
146 | * @param string $fileName Image file name with extension
147 | * @return bool Operation result
148 | */
149 | private function fetchImageFromRemote($fileName)
150 | {
151 | $localPath = $this->getLocalStoragePath($fileName);
152 | $isLocalFileExist = Storage::disk('local')->exists($localPath);
153 |
154 | if (!$isLocalFileExist) {
155 | $remotePath = $this->getRemoteStoragePath($fileName);
156 | if (Storage::disk('minio')->exists($remotePath)) {
157 | try {
158 | $fileContent = Storage::disk('minio')->get($remotePath);
159 | $isLocalFileExist = Storage::disk('local')->put($localPath, $fileContent);
160 | } catch (Exception $exception) {
161 | $isLocalFileExist = false;
162 | }
163 | }
164 | }
165 |
166 | return $isLocalFileExist;
167 | }
168 |
169 | /**
170 | * Push image to remote
171 | *
172 | * @param string $fileName File name
173 | * @return bool Operation result
174 | */
175 | private function pushImageToRemote($fileName)
176 | {
177 | $localPath = $this->getLocalStoragePath($fileName);
178 | if (\Storage::disk('local')->exists($localPath)) {
179 | $remotePath = $this->getRemoteStoragePath($fileName);
180 | try {
181 | $localFile = \Storage::getDriver()->readStream($localPath);
182 | \Storage::disk('minio')->put($remotePath, $localFile);
183 | } catch (\Exception $exception) {
184 | return false;
185 | }
186 |
187 | return true;
188 | } else {
189 | return false;
190 | }
191 | }
192 |
193 | /**
194 | * Save single image file and push it to remote
195 | *
196 | * @param UploadedFile $imageFile
197 | * @param array $options Other Options
198 | * @return array
199 | */
200 | private function saveSingleImage($imageFile, $options = [])
201 | {
202 | if ($this->validateImageFile($imageFile)) {
203 | $code = $this->generateCode(5, true);
204 | $deleteCode = $code . $this->generateCode();
205 | $originalName = $imageFile->getClientOriginalName();
206 | $originalExtension = $imageFile->getClientOriginalExtension();
207 |
208 | $imageOperation = ImageIntervention::make($imageFile);
209 | $imageWidth = $imageOperation->width();
210 | $imageHeight = $imageOperation->height();
211 | $imageSize = $imageOperation->fileSize();
212 |
213 | $fingerprint = md5_file($imageFile->path());
214 |
215 | $existImage = Image::where('fingerprint', $fingerprint)->first();
216 | $saveName = $existImage ? $existImage->save_name : $code . '.' . $originalExtension;
217 |
218 | if ($existImage || ($imageFile->storeAs($this->getLocalStoragePath(),
219 | $saveName, ['disk' => 'local']) && $this->pushImageToRemote($saveName))) {
220 | $image = new Image();
221 |
222 | $image->code = $code;
223 | $image->delete_code = $deleteCode;
224 | $image->name = $originalName;
225 | $image->ext = $originalExtension;
226 | $image->width = $imageWidth;
227 | $image->height = $imageHeight;
228 | $image->nsfw = $options['nsfw'] ?: false;
229 | $image->uploader_ip = $options['uploader_ip'] ?: '';
230 | $image->fingerprint = $fingerprint;
231 | $image->save_name = $saveName;
232 | $image->size = $imageSize;
233 | $image->views = 0;
234 | $image->save();
235 | }
236 | }
237 |
238 | if (isset($image) && !empty($image->code)) {
239 | return [
240 | 'name' => $image->name,
241 | 'link' => route('showImage', [
242 | 'code' => $image->code,
243 | 'name' => $image->name,
244 | ]),
245 | 'deleteLink' => route('deleteImage', ['deleteCode' => $image->delete_code])
246 | ];
247 | } else {
248 | return [];
249 | }
250 | }
251 | }
252 |
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 | env('APP_NAME', 'Laravel'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Application Environment
21 | |--------------------------------------------------------------------------
22 | |
23 | | This value determines the "environment" your application is currently
24 | | running in. This may determine how you prefer to configure various
25 | | services the application utilizes. Set this in your ".env" file.
26 | |
27 | */
28 |
29 | 'env' => env('APP_ENV', 'production'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Application Debug Mode
34 | |--------------------------------------------------------------------------
35 | |
36 | | When your application is in debug mode, detailed error messages with
37 | | stack traces will be shown on every error that occurs within your
38 | | application. If disabled, a simple generic error page is shown.
39 | |
40 | */
41 |
42 | 'debug' => env('APP_DEBUG', false),
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Application URL
47 | |--------------------------------------------------------------------------
48 | |
49 | | This URL is used by the console to properly generate URLs when using
50 | | the Artisan command line tool. You should set this to the root of
51 | | your application so that it is used when running Artisan tasks.
52 | |
53 | */
54 |
55 | 'url' => env('APP_URL', 'http://localhost'),
56 |
57 | 'asset_url' => env('ASSET_URL', null),
58 |
59 | /*
60 | |--------------------------------------------------------------------------
61 | | Application Timezone
62 | |--------------------------------------------------------------------------
63 | |
64 | | Here you may specify the default timezone for your application, which
65 | | will be used by the PHP date and date-time functions. We have gone
66 | | ahead and set this to a sensible default for you out of the box.
67 | |
68 | */
69 |
70 | 'timezone' => 'Asia/Shanghai',
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | Application Locale Configuration
75 | |--------------------------------------------------------------------------
76 | |
77 | | The application locale determines the default locale that will be used
78 | | by the translation service provider. You are free to set this value
79 | | to any of the locales which will be supported by the application.
80 | |
81 | */
82 |
83 | 'locale' => 'en',
84 |
85 | /*
86 | |--------------------------------------------------------------------------
87 | | Application Fallback Locale
88 | |--------------------------------------------------------------------------
89 | |
90 | | The fallback locale determines the locale to use when the current one
91 | | is not available. You may change the value to correspond to any of
92 | | the language folders that are provided through your application.
93 | |
94 | */
95 |
96 | 'fallback_locale' => 'en',
97 |
98 | /*
99 | |--------------------------------------------------------------------------
100 | | Faker Locale
101 | |--------------------------------------------------------------------------
102 | |
103 | | This locale will be used by the Faker PHP library when generating fake
104 | | data for your database seeds. For example, this will be used to get
105 | | localized telephone numbers, street address information and more.
106 | |
107 | */
108 |
109 | 'faker_locale' => 'en_US',
110 |
111 | /*
112 | |--------------------------------------------------------------------------
113 | | Encryption Key
114 | |--------------------------------------------------------------------------
115 | |
116 | | This key is used by the Illuminate encrypter service and should be set
117 | | to a random, 32 character string, otherwise these encrypted strings
118 | | will not be safe. Please do this before deploying an application!
119 | |
120 | */
121 |
122 | 'key' => env('APP_KEY'),
123 |
124 | 'cipher' => 'AES-256-CBC',
125 |
126 | /*
127 | |--------------------------------------------------------------------------
128 | | Autoloaded Service Providers
129 | |--------------------------------------------------------------------------
130 | |
131 | | The service providers listed here will be automatically loaded on the
132 | | request to your application. Feel free to add your own services to
133 | | this array to grant expanded functionality to your applications.
134 | |
135 | */
136 |
137 | 'providers' => [
138 |
139 | /*
140 | * Laravel Framework Service Providers...
141 | */
142 | Illuminate\Auth\AuthServiceProvider::class,
143 | Illuminate\Broadcasting\BroadcastServiceProvider::class,
144 | Illuminate\Bus\BusServiceProvider::class,
145 | Illuminate\Cache\CacheServiceProvider::class,
146 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
147 | Illuminate\Cookie\CookieServiceProvider::class,
148 | Illuminate\Database\DatabaseServiceProvider::class,
149 | Illuminate\Encryption\EncryptionServiceProvider::class,
150 | Illuminate\Filesystem\FilesystemServiceProvider::class,
151 | Illuminate\Foundation\Providers\FoundationServiceProvider::class,
152 | Illuminate\Hashing\HashServiceProvider::class,
153 | Illuminate\Mail\MailServiceProvider::class,
154 | Illuminate\Notifications\NotificationServiceProvider::class,
155 | Illuminate\Pagination\PaginationServiceProvider::class,
156 | Illuminate\Pipeline\PipelineServiceProvider::class,
157 | Illuminate\Queue\QueueServiceProvider::class,
158 | Illuminate\Redis\RedisServiceProvider::class,
159 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
160 | Illuminate\Session\SessionServiceProvider::class,
161 | Illuminate\Translation\TranslationServiceProvider::class,
162 | Illuminate\Validation\ValidationServiceProvider::class,
163 | Illuminate\View\ViewServiceProvider::class,
164 |
165 | /*
166 | * Package Service Providers...
167 | */
168 | Intervention\Image\ImageServiceProvider::class,
169 |
170 | /*
171 | * Application Service Providers...
172 | */
173 | App\Providers\AppServiceProvider::class,
174 | App\Providers\AuthServiceProvider::class,
175 | // App\Providers\BroadcastServiceProvider::class,
176 | App\Providers\EventServiceProvider::class,
177 | App\Providers\RouteServiceProvider::class,
178 |
179 | App\Providers\MinIOStorageServiceProvider::class,
180 |
181 | ],
182 |
183 | /*
184 | |--------------------------------------------------------------------------
185 | | Class Aliases
186 | |--------------------------------------------------------------------------
187 | |
188 | | This array of class aliases will be registered when this application
189 | | is started. However, feel free to register as many as you wish as
190 | | the aliases are "lazy" loaded so they don't hinder performance.
191 | |
192 | */
193 |
194 | 'aliases' => [
195 |
196 | 'App' => Illuminate\Support\Facades\App::class,
197 | 'Arr' => Illuminate\Support\Arr::class,
198 | 'Artisan' => Illuminate\Support\Facades\Artisan::class,
199 | 'Auth' => Illuminate\Support\Facades\Auth::class,
200 | 'Blade' => Illuminate\Support\Facades\Blade::class,
201 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
202 | 'Bus' => Illuminate\Support\Facades\Bus::class,
203 | 'Cache' => Illuminate\Support\Facades\Cache::class,
204 | 'Config' => Illuminate\Support\Facades\Config::class,
205 | 'Cookie' => Illuminate\Support\Facades\Cookie::class,
206 | 'Crypt' => Illuminate\Support\Facades\Crypt::class,
207 | 'DB' => Illuminate\Support\Facades\DB::class,
208 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
209 | 'Event' => Illuminate\Support\Facades\Event::class,
210 | 'File' => Illuminate\Support\Facades\File::class,
211 | 'Gate' => Illuminate\Support\Facades\Gate::class,
212 | 'Hash' => Illuminate\Support\Facades\Hash::class,
213 | 'Lang' => Illuminate\Support\Facades\Lang::class,
214 | 'Log' => Illuminate\Support\Facades\Log::class,
215 | 'Mail' => Illuminate\Support\Facades\Mail::class,
216 | 'Notification' => Illuminate\Support\Facades\Notification::class,
217 | 'Password' => Illuminate\Support\Facades\Password::class,
218 | 'Queue' => Illuminate\Support\Facades\Queue::class,
219 | 'Redirect' => Illuminate\Support\Facades\Redirect::class,
220 | 'Redis' => Illuminate\Support\Facades\Redis::class,
221 | 'Request' => Illuminate\Support\Facades\Request::class,
222 | 'Response' => Illuminate\Support\Facades\Response::class,
223 | 'Route' => Illuminate\Support\Facades\Route::class,
224 | 'Schema' => Illuminate\Support\Facades\Schema::class,
225 | 'Session' => Illuminate\Support\Facades\Session::class,
226 | 'Storage' => Illuminate\Support\Facades\Storage::class,
227 | 'Str' => Illuminate\Support\Str::class,
228 | 'URL' => Illuminate\Support\Facades\URL::class,
229 | 'Validator' => Illuminate\Support\Facades\Validator::class,
230 | 'View' => Illuminate\Support\Facades\View::class,
231 |
232 | 'ImageIntervention' => Intervention\Image\Facades\Image::class,
233 |
234 | ],
235 |
236 | ];
237 |
--------------------------------------------------------------------------------