create-v-kit-spa 0.10.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -9
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +3 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +8 -4
- package/lib/159/.editorconfig +18 -0
- package/lib/159/.env.example +52 -0
- package/lib/159/.gitattributes +10 -0
- package/lib/159/.styleci.yml +14 -0
- package/lib/159/README.md +190 -0
- package/lib/159/RG-README.md +175 -0
- package/lib/159/app/Console/Kernel.php +32 -0
- package/lib/159/app/Exceptions/Handler.php +41 -0
- package/lib/159/app/Http/Controllers/Controller.php +13 -0
- package/lib/159/app/Http/Controllers/MainController.php +12 -0
- package/lib/159/app/Http/Kernel.php +67 -0
- package/lib/159/app/Http/Middleware/Authenticate.php +21 -0
- package/lib/159/app/Http/Middleware/EncryptCookies.php +17 -0
- package/lib/159/app/Http/Middleware/PreventRequestsDuringMaintenance.php +17 -0
- package/lib/159/app/Http/Middleware/RedirectIfAuthenticated.php +32 -0
- package/lib/159/app/Http/Middleware/TrimStrings.php +19 -0
- package/lib/159/app/Http/Middleware/TrustHosts.php +20 -0
- package/lib/159/app/Http/Middleware/TrustProxies.php +28 -0
- package/lib/159/app/Http/Middleware/VerifyCsrfToken.php +17 -0
- package/lib/159/app/Models/User.php +44 -0
- package/lib/159/app/Providers/AppServiceProvider.php +28 -0
- package/lib/159/app/Providers/AuthServiceProvider.php +30 -0
- package/lib/159/app/Providers/BroadcastServiceProvider.php +21 -0
- package/lib/159/app/Providers/EventServiceProvider.php +32 -0
- package/lib/159/app/Providers/RouteServiceProvider.php +63 -0
- package/lib/159/artisan +53 -0
- package/lib/159/bootstrap/app.php +55 -0
- package/lib/159/bootstrap/cache/.gitignore +2 -0
- package/lib/159/composer.json +62 -0
- package/lib/159/config/app.php +235 -0
- package/lib/159/config/auth.php +111 -0
- package/lib/159/config/broadcasting.php +64 -0
- package/lib/159/config/cache.php +110 -0
- package/lib/159/config/cors.php +34 -0
- package/lib/159/config/database.php +147 -0
- package/lib/159/config/filesystems.php +73 -0
- package/lib/159/config/hashing.php +52 -0
- package/lib/159/config/logging.php +118 -0
- package/lib/159/config/mail.php +118 -0
- package/lib/159/config/queue.php +93 -0
- package/lib/159/config/sanctum.php +65 -0
- package/lib/159/config/services.php +33 -0
- package/lib/159/config/session.php +201 -0
- package/lib/159/config/view.php +36 -0
- package/lib/159/database/factories/UserFactory.php +39 -0
- package/lib/159/database/migrations/2014_10_12_000000_create_users_table.php +36 -0
- package/lib/159/database/migrations/2014_10_12_100000_create_password_resets_table.php +32 -0
- package/lib/159/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +36 -0
- package/lib/159/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +36 -0
- package/lib/159/database/seeders/DatabaseSeeder.php +18 -0
- package/lib/159/package.json +28 -0
- package/lib/159/phpunit.xml +31 -0
- package/lib/159/public/.htaccess +21 -0
- package/lib/159/public/css/app.css +1 -0
- package/lib/159/public/fonts/vendor/@mdi/materialdesignicons-webfont.eot +0 -0
- package/lib/159/public/fonts/vendor/@mdi/materialdesignicons-webfont.ttf +0 -0
- package/lib/159/public/fonts/vendor/@mdi/materialdesignicons-webfont.woff +0 -0
- package/lib/159/public/fonts/vendor/@mdi/materialdesignicons-webfont.woff2 +0 -0
- package/lib/159/public/index.php +55 -0
- package/lib/159/public/js/app.js +81066 -0
- package/lib/159/public/js/resources_js_components_pages_About_vue.js +62 -0
- package/lib/159/public/js/resources_js_components_pages_Error_vue.js +62 -0
- package/lib/159/public/js/resources_js_components_pages_Home_vue.js +143 -0
- package/lib/159/public/mix-manifest.json +4 -0
- package/lib/159/public/robots.txt +2 -0
- package/lib/159/resources/css/app.css +0 -0
- package/lib/159/resources/js/app.js +37 -0
- package/lib/159/resources/js/bootstrap.js +28 -0
- package/lib/159/resources/js/components/pages/About.vue +5 -0
- package/lib/159/resources/js/components/pages/Error.vue +5 -0
- package/lib/159/resources/js/components/pages/Home.vue +21 -0
- package/lib/159/resources/js/components/templates/App.vue +86 -0
- package/lib/159/resources/js/mainStore.js +20 -0
- package/lib/159/resources/js/router.js +41 -0
- package/lib/159/resources/lang/en/auth.php +20 -0
- package/lib/159/resources/lang/en/pagination.php +19 -0
- package/lib/159/resources/lang/en/passwords.php +22 -0
- package/lib/159/resources/lang/en/validation.php +163 -0
- package/lib/159/resources/views/layouts/app.blade.php +14 -0
- package/lib/159/resources/views/welcome.blade.php +132 -0
- package/lib/159/routes/api.php +19 -0
- package/lib/159/routes/channels.php +18 -0
- package/lib/159/routes/console.php +19 -0
- package/lib/159/routes/web.php +20 -0
- package/lib/159/server.php +21 -0
- package/lib/159/storage/app/.gitignore +3 -0
- package/lib/159/storage/app/public/.gitignore +2 -0
- package/lib/159/storage/framework/cache/.gitignore +3 -0
- package/lib/159/storage/framework/cache/data/.gitignore +2 -0
- package/lib/159/storage/framework/sessions/.gitignore +2 -0
- package/lib/159/storage/framework/testing/.gitignore +2 -0
- package/lib/159/storage/framework/views/.gitignore +2 -0
- package/lib/159/storage/logs/.gitignore +2 -0
- package/lib/159/tests/CreatesApplication.php +22 -0
- package/lib/159/tests/Feature/ExampleTest.php +21 -0
- package/lib/159/tests/TestCase.php +10 -0
- package/lib/159/tests/Unit/ExampleTest.php +18 -0
- package/lib/159/webpack.mix.js +18 -0
- package/package.json +1 -1
- /package/lib/159/{Still Under Development Thank you.txt → public/favicon.ico} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Controllers;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
6
|
+
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
7
|
+
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
8
|
+
use Illuminate\Routing\Controller as BaseController;
|
|
9
|
+
|
|
10
|
+
class Controller extends BaseController
|
|
11
|
+
{
|
|
12
|
+
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
|
13
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
6
|
+
|
|
7
|
+
class Kernel extends HttpKernel
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* The application's global HTTP middleware stack.
|
|
11
|
+
*
|
|
12
|
+
* These middleware are run during every request to your application.
|
|
13
|
+
*
|
|
14
|
+
* @var array<int, class-string|string>
|
|
15
|
+
*/
|
|
16
|
+
protected $middleware = [
|
|
17
|
+
// \App\Http\Middleware\TrustHosts::class,
|
|
18
|
+
\App\Http\Middleware\TrustProxies::class,
|
|
19
|
+
\Fruitcake\Cors\HandleCors::class,
|
|
20
|
+
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
|
21
|
+
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
|
22
|
+
\App\Http\Middleware\TrimStrings::class,
|
|
23
|
+
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The application's route middleware groups.
|
|
28
|
+
*
|
|
29
|
+
* @var array<string, array<int, class-string|string>>
|
|
30
|
+
*/
|
|
31
|
+
protected $middlewareGroups = [
|
|
32
|
+
'web' => [
|
|
33
|
+
\App\Http\Middleware\EncryptCookies::class,
|
|
34
|
+
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
|
35
|
+
\Illuminate\Session\Middleware\StartSession::class,
|
|
36
|
+
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
|
37
|
+
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
|
38
|
+
\App\Http\Middleware\VerifyCsrfToken::class,
|
|
39
|
+
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
40
|
+
],
|
|
41
|
+
|
|
42
|
+
'api' => [
|
|
43
|
+
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
|
44
|
+
'throttle:api',
|
|
45
|
+
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
|
46
|
+
],
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The application's route middleware.
|
|
51
|
+
*
|
|
52
|
+
* These middleware may be assigned to groups or used individually.
|
|
53
|
+
*
|
|
54
|
+
* @var array<string, class-string|string>
|
|
55
|
+
*/
|
|
56
|
+
protected $routeMiddleware = [
|
|
57
|
+
'auth' => \App\Http\Middleware\Authenticate::class,
|
|
58
|
+
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
|
59
|
+
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
|
60
|
+
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
|
61
|
+
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
|
62
|
+
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
|
63
|
+
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
|
64
|
+
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
65
|
+
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
|
66
|
+
];
|
|
67
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Middleware;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
|
6
|
+
|
|
7
|
+
class Authenticate extends Middleware
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* Get the path the user should be redirected to when they are not authenticated.
|
|
11
|
+
*
|
|
12
|
+
* @param \Illuminate\Http\Request $request
|
|
13
|
+
* @return string|null
|
|
14
|
+
*/
|
|
15
|
+
protected function redirectTo($request)
|
|
16
|
+
{
|
|
17
|
+
if (! $request->expectsJson()) {
|
|
18
|
+
return route('login');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Middleware;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
|
6
|
+
|
|
7
|
+
class EncryptCookies extends Middleware
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* The names of the cookies that should not be encrypted.
|
|
11
|
+
*
|
|
12
|
+
* @var array<int, string>
|
|
13
|
+
*/
|
|
14
|
+
protected $except = [
|
|
15
|
+
//
|
|
16
|
+
];
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Middleware;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
|
6
|
+
|
|
7
|
+
class PreventRequestsDuringMaintenance extends Middleware
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* The URIs that should be reachable while maintenance mode is enabled.
|
|
11
|
+
*
|
|
12
|
+
* @var array<int, string>
|
|
13
|
+
*/
|
|
14
|
+
protected $except = [
|
|
15
|
+
//
|
|
16
|
+
];
|
|
17
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Middleware;
|
|
4
|
+
|
|
5
|
+
use App\Providers\RouteServiceProvider;
|
|
6
|
+
use Closure;
|
|
7
|
+
use Illuminate\Http\Request;
|
|
8
|
+
use Illuminate\Support\Facades\Auth;
|
|
9
|
+
|
|
10
|
+
class RedirectIfAuthenticated
|
|
11
|
+
{
|
|
12
|
+
/**
|
|
13
|
+
* Handle an incoming request.
|
|
14
|
+
*
|
|
15
|
+
* @param \Illuminate\Http\Request $request
|
|
16
|
+
* @param \Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next
|
|
17
|
+
* @param string|null ...$guards
|
|
18
|
+
* @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse
|
|
19
|
+
*/
|
|
20
|
+
public function handle(Request $request, Closure $next, ...$guards)
|
|
21
|
+
{
|
|
22
|
+
$guards = empty($guards) ? [null] : $guards;
|
|
23
|
+
|
|
24
|
+
foreach ($guards as $guard) {
|
|
25
|
+
if (Auth::guard($guard)->check()) {
|
|
26
|
+
return redirect(RouteServiceProvider::HOME);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return $next($request);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Middleware;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
|
6
|
+
|
|
7
|
+
class TrimStrings extends Middleware
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* The names of the attributes that should not be trimmed.
|
|
11
|
+
*
|
|
12
|
+
* @var array<int, string>
|
|
13
|
+
*/
|
|
14
|
+
protected $except = [
|
|
15
|
+
'current_password',
|
|
16
|
+
'password',
|
|
17
|
+
'password_confirmation',
|
|
18
|
+
];
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Middleware;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
|
6
|
+
|
|
7
|
+
class TrustHosts extends Middleware
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* Get the host patterns that should be trusted.
|
|
11
|
+
*
|
|
12
|
+
* @return array<int, string|null>
|
|
13
|
+
*/
|
|
14
|
+
public function hosts()
|
|
15
|
+
{
|
|
16
|
+
return [
|
|
17
|
+
$this->allSubdomainsOfApplicationUrl(),
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -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,17 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Http\Middleware;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
|
6
|
+
|
|
7
|
+
class VerifyCsrfToken extends Middleware
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* The URIs that should be excluded from CSRF verification.
|
|
11
|
+
*
|
|
12
|
+
* @var array<int, string>
|
|
13
|
+
*/
|
|
14
|
+
protected $except = [
|
|
15
|
+
//
|
|
16
|
+
];
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Models;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
|
6
|
+
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
7
|
+
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
8
|
+
use Illuminate\Notifications\Notifiable;
|
|
9
|
+
use Laravel\Sanctum\HasApiTokens;
|
|
10
|
+
|
|
11
|
+
class User extends Authenticatable
|
|
12
|
+
{
|
|
13
|
+
use HasApiTokens, HasFactory, Notifiable;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The attributes that are mass assignable.
|
|
17
|
+
*
|
|
18
|
+
* @var array<int, string>
|
|
19
|
+
*/
|
|
20
|
+
protected $fillable = [
|
|
21
|
+
'name',
|
|
22
|
+
'email',
|
|
23
|
+
'password',
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The attributes that should be hidden for serialization.
|
|
28
|
+
*
|
|
29
|
+
* @var array<int, string>
|
|
30
|
+
*/
|
|
31
|
+
protected $hidden = [
|
|
32
|
+
'password',
|
|
33
|
+
'remember_token',
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The attributes that should be cast.
|
|
38
|
+
*
|
|
39
|
+
* @var array<string, string>
|
|
40
|
+
*/
|
|
41
|
+
protected $casts = [
|
|
42
|
+
'email_verified_at' => 'datetime',
|
|
43
|
+
];
|
|
44
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Providers;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Support\ServiceProvider;
|
|
6
|
+
|
|
7
|
+
class AppServiceProvider extends ServiceProvider
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* Register any application services.
|
|
11
|
+
*
|
|
12
|
+
* @return void
|
|
13
|
+
*/
|
|
14
|
+
public function register()
|
|
15
|
+
{
|
|
16
|
+
//
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Bootstrap any application services.
|
|
21
|
+
*
|
|
22
|
+
* @return void
|
|
23
|
+
*/
|
|
24
|
+
public function boot()
|
|
25
|
+
{
|
|
26
|
+
//
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Providers;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
|
6
|
+
use Illuminate\Support\Facades\Gate;
|
|
7
|
+
|
|
8
|
+
class AuthServiceProvider extends ServiceProvider
|
|
9
|
+
{
|
|
10
|
+
/**
|
|
11
|
+
* The policy mappings for the application.
|
|
12
|
+
*
|
|
13
|
+
* @var array<class-string, class-string>
|
|
14
|
+
*/
|
|
15
|
+
protected $policies = [
|
|
16
|
+
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Register any authentication / authorization services.
|
|
21
|
+
*
|
|
22
|
+
* @return void
|
|
23
|
+
*/
|
|
24
|
+
public function boot()
|
|
25
|
+
{
|
|
26
|
+
$this->registerPolicies();
|
|
27
|
+
|
|
28
|
+
//
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Providers;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Support\Facades\Broadcast;
|
|
6
|
+
use Illuminate\Support\ServiceProvider;
|
|
7
|
+
|
|
8
|
+
class BroadcastServiceProvider extends ServiceProvider
|
|
9
|
+
{
|
|
10
|
+
/**
|
|
11
|
+
* Bootstrap any application services.
|
|
12
|
+
*
|
|
13
|
+
* @return void
|
|
14
|
+
*/
|
|
15
|
+
public function boot()
|
|
16
|
+
{
|
|
17
|
+
Broadcast::routes();
|
|
18
|
+
|
|
19
|
+
require base_path('routes/channels.php');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App\Providers;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Auth\Events\Registered;
|
|
6
|
+
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
|
7
|
+
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
8
|
+
use Illuminate\Support\Facades\Event;
|
|
9
|
+
|
|
10
|
+
class EventServiceProvider extends ServiceProvider
|
|
11
|
+
{
|
|
12
|
+
/**
|
|
13
|
+
* The event listener mappings for the application.
|
|
14
|
+
*
|
|
15
|
+
* @var array<class-string, array<int, class-string>>
|
|
16
|
+
*/
|
|
17
|
+
protected $listen = [
|
|
18
|
+
Registered::class => [
|
|
19
|
+
SendEmailVerificationNotification::class,
|
|
20
|
+
],
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Register any events for your application.
|
|
25
|
+
*
|
|
26
|
+
* @return void
|
|
27
|
+
*/
|
|
28
|
+
public function boot()
|
|
29
|
+
{
|
|
30
|
+
//
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
* This is used by Laravel authentication to redirect users after login.
|
|
17
|
+
*
|
|
18
|
+
* @var string
|
|
19
|
+
*/
|
|
20
|
+
public const HOME = '/home';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The controller namespace for the application.
|
|
24
|
+
*
|
|
25
|
+
* When present, controller route declarations will automatically be prefixed with this namespace.
|
|
26
|
+
*
|
|
27
|
+
* @var string|null
|
|
28
|
+
*/
|
|
29
|
+
// protected $namespace = 'App\\Http\\Controllers';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Define your route model bindings, pattern filters, etc.
|
|
33
|
+
*
|
|
34
|
+
* @return void
|
|
35
|
+
*/
|
|
36
|
+
public function boot()
|
|
37
|
+
{
|
|
38
|
+
$this->configureRateLimiting();
|
|
39
|
+
|
|
40
|
+
$this->routes(function () {
|
|
41
|
+
Route::prefix('api')
|
|
42
|
+
->middleware('api')
|
|
43
|
+
->namespace($this->namespace)
|
|
44
|
+
->group(base_path('routes/api.php'));
|
|
45
|
+
|
|
46
|
+
Route::middleware('web')
|
|
47
|
+
->namespace($this->namespace)
|
|
48
|
+
->group(base_path('routes/web.php'));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Configure the rate limiters for the application.
|
|
54
|
+
*
|
|
55
|
+
* @return void
|
|
56
|
+
*/
|
|
57
|
+
protected function configureRateLimiting()
|
|
58
|
+
{
|
|
59
|
+
RateLimiter::for('api', function (Request $request) {
|
|
60
|
+
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
package/lib/159/artisan
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env php
|
|
2
|
+
<?php
|
|
3
|
+
|
|
4
|
+
define('LARAVEL_START', microtime(true));
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
|--------------------------------------------------------------------------
|
|
8
|
+
| Register The Auto Loader
|
|
9
|
+
|--------------------------------------------------------------------------
|
|
10
|
+
|
|
|
11
|
+
| Composer provides a convenient, automatically generated class loader
|
|
12
|
+
| for our application. We just need to utilize it! We'll require it
|
|
13
|
+
| into the script here so that we do not have to worry about the
|
|
14
|
+
| loading of any of our classes manually. It's great to relax.
|
|
15
|
+
|
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
require __DIR__.'/vendor/autoload.php';
|
|
19
|
+
|
|
20
|
+
$app = require_once __DIR__.'/bootstrap/app.php';
|
|
21
|
+
|
|
22
|
+
/*
|
|
23
|
+
|--------------------------------------------------------------------------
|
|
24
|
+
| Run The Artisan Application
|
|
25
|
+
|--------------------------------------------------------------------------
|
|
26
|
+
|
|
|
27
|
+
| When we run the console application, the current CLI command will be
|
|
28
|
+
| executed in this console and the response sent back to a terminal
|
|
29
|
+
| or another output device for the developers. Here goes nothing!
|
|
30
|
+
|
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
|
34
|
+
|
|
35
|
+
$status = $kernel->handle(
|
|
36
|
+
$input = new Symfony\Component\Console\Input\ArgvInput,
|
|
37
|
+
new Symfony\Component\Console\Output\ConsoleOutput
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
|--------------------------------------------------------------------------
|
|
42
|
+
| Shutdown The Application
|
|
43
|
+
|--------------------------------------------------------------------------
|
|
44
|
+
|
|
|
45
|
+
| Once Artisan has finished running, we will fire off the shutdown events
|
|
46
|
+
| so that any final work may be done by the application before we shut
|
|
47
|
+
| down the process. This is the last thing to happen to the request.
|
|
48
|
+
|
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
$kernel->terminate($input, $status);
|
|
52
|
+
|
|
53
|
+
exit($status);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
|--------------------------------------------------------------------------
|
|
5
|
+
| Create The Application
|
|
6
|
+
|--------------------------------------------------------------------------
|
|
7
|
+
|
|
|
8
|
+
| The first thing we will do is create a new Laravel application instance
|
|
9
|
+
| which serves as the "glue" for all the components of Laravel, and is
|
|
10
|
+
| the IoC container for the system binding all of the various parts.
|
|
11
|
+
|
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
$app = new Illuminate\Foundation\Application(
|
|
15
|
+
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
|--------------------------------------------------------------------------
|
|
20
|
+
| Bind Important Interfaces
|
|
21
|
+
|--------------------------------------------------------------------------
|
|
22
|
+
|
|
|
23
|
+
| Next, we need to bind some important interfaces into the container so
|
|
24
|
+
| we will be able to resolve them when needed. The kernels serve the
|
|
25
|
+
| incoming requests to this application from both the web and CLI.
|
|
26
|
+
|
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
$app->singleton(
|
|
30
|
+
Illuminate\Contracts\Http\Kernel::class,
|
|
31
|
+
App\Http\Kernel::class
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
$app->singleton(
|
|
35
|
+
Illuminate\Contracts\Console\Kernel::class,
|
|
36
|
+
App\Console\Kernel::class
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
$app->singleton(
|
|
40
|
+
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
|
41
|
+
App\Exceptions\Handler::class
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
|--------------------------------------------------------------------------
|
|
46
|
+
| Return The Application
|
|
47
|
+
|--------------------------------------------------------------------------
|
|
48
|
+
|
|
|
49
|
+
| This script returns the application instance. The instance is given to
|
|
50
|
+
| the calling script so we can separate the building of the instances
|
|
51
|
+
| from the actual running of the application and sending responses.
|
|
52
|
+
|
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
return $app;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "laravel/laravel",
|
|
3
|
+
"type": "project",
|
|
4
|
+
"description": "The Laravel Framework.",
|
|
5
|
+
"keywords": ["framework", "laravel"],
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"require": {
|
|
8
|
+
"php": "^7.3|^8.0",
|
|
9
|
+
"fruitcake/laravel-cors": "^2.0",
|
|
10
|
+
"guzzlehttp/guzzle": "^7.0.1",
|
|
11
|
+
"laravel/framework": "^8.75",
|
|
12
|
+
"laravel/sanctum": "^2.11",
|
|
13
|
+
"laravel/tinker": "^2.5"
|
|
14
|
+
},
|
|
15
|
+
"require-dev": {
|
|
16
|
+
"facade/ignition": "^2.5",
|
|
17
|
+
"fakerphp/faker": "^1.9.1",
|
|
18
|
+
"laravel/sail": "^1.0.1",
|
|
19
|
+
"mockery/mockery": "^1.4.4",
|
|
20
|
+
"nunomaduro/collision": "^5.10",
|
|
21
|
+
"phpunit/phpunit": "^9.5.10"
|
|
22
|
+
},
|
|
23
|
+
"autoload": {
|
|
24
|
+
"psr-4": {
|
|
25
|
+
"App\\": "app/",
|
|
26
|
+
"Database\\Factories\\": "database/factories/",
|
|
27
|
+
"Database\\Seeders\\": "database/seeders/"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"autoload-dev": {
|
|
31
|
+
"psr-4": {
|
|
32
|
+
"Tests\\": "tests/"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"post-autoload-dump": [
|
|
37
|
+
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
|
38
|
+
"@php artisan package:discover --ansi"
|
|
39
|
+
],
|
|
40
|
+
"post-update-cmd": [
|
|
41
|
+
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
|
42
|
+
],
|
|
43
|
+
"post-root-package-install": [
|
|
44
|
+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
|
45
|
+
],
|
|
46
|
+
"post-create-project-cmd": [
|
|
47
|
+
"@php artisan key:generate --ansi"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"extra": {
|
|
51
|
+
"laravel": {
|
|
52
|
+
"dont-discover": []
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"config": {
|
|
56
|
+
"optimize-autoloader": true,
|
|
57
|
+
"preferred-install": "dist",
|
|
58
|
+
"sort-packages": true
|
|
59
|
+
},
|
|
60
|
+
"minimum-stability": "dev",
|
|
61
|
+
"prefer-stable": true
|
|
62
|
+
}
|