Skip to content

Commit 72d53f8

Browse files
authored
Merge pull request #1400 from krayin/2.x
2.x
2 parents ed43cf9 + d7a0c9c commit 72d53f8

File tree

167 files changed

+2523
-5114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+2523
-5114
lines changed

.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
APP_NAME='Krayin CRM'
22
APP_ENV=local
3-
APP_VERSION=1.3.0
43
APP_KEY=
54
APP_DEBUG=true
65
APP_URL=http://localhost

app/Console/Kernel.php

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,21 @@
77

88
class Kernel extends ConsoleKernel
99
{
10-
/**
11-
* The Artisan commands provided by your application.
12-
*
13-
* @var array
14-
*/
15-
protected $commands = [
16-
//
17-
];
18-
1910
/**
2011
* Define the application's command schedule.
21-
*
22-
* @return void
2312
*/
24-
protected function schedule(Schedule $schedule)
13+
protected function schedule(Schedule $schedule): void
2514
{
2615
// $schedule->command('inspire')->hourly();
2716
}
2817

2918
/**
3019
* Register the commands for the application.
31-
*
32-
* @return void
3320
*/
34-
protected function commands()
21+
protected function commands(): void
3522
{
3623
$this->load(__DIR__.'/Commands');
24+
3725
$this->load(__DIR__.'/../../packages/Webkul/Core/src/Console/Commands');
3826

3927
require base_path('routes/console.php');

app/Exceptions/Handler.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,10 @@
77

88
class Handler extends ExceptionHandler
99
{
10-
/**
11-
* A list of the exception types that are not reported.
12-
*
13-
* @var array
14-
*/
15-
protected $dontReport = [
16-
//
17-
];
18-
1910
/**
2011
* A list of the inputs that are never flashed for validation exceptions.
2112
*
22-
* @var array
13+
* @var array<int, string>
2314
*/
2415
protected $dontFlash = [
2516
'current_password',
@@ -29,10 +20,8 @@ class Handler extends ExceptionHandler
2920

3021
/**
3122
* Register the exception handling callbacks for the application.
32-
*
33-
* @return void
3423
*/
35-
public function register()
24+
public function register(): void
3625
{
3726
$this->reportable(function (Throwable $e) {
3827
//

app/Providers/AuthServiceProvider.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,25 @@
22

33
namespace App\Providers;
44

5+
// use Illuminate\Support\Facades\Gate;
56
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
67

78
class AuthServiceProvider extends ServiceProvider
89
{
910
/**
10-
* The policy mappings for the application.
11+
* The model to policy mappings for the application.
1112
*
12-
* @var array
13+
* @var array<class-string, class-string>
1314
*/
1415
protected $policies = [
15-
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
16+
//
1617
];
1718

1819
/**
1920
* Register any authentication / authorization services.
20-
*
21-
* @return void
2221
*/
23-
public function boot()
22+
public function boot(): void
2423
{
25-
$this->registerPolicies();
26-
2724
//
2825
}
2926
}

app/Providers/BroadcastServiceProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ class BroadcastServiceProvider extends ServiceProvider
99
{
1010
/**
1111
* Bootstrap any application services.
12-
*
13-
* @return void
1412
*/
15-
public function boot()
13+
public function boot(): void
1614
{
1715
Broadcast::routes();
1816

app/Providers/EventServiceProvider.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
class EventServiceProvider extends ServiceProvider
1111
{
1212
/**
13-
* The event listener mappings for the application.
13+
* The event to listener mappings for the application.
1414
*
15-
* @var array
15+
* @var array<class-string, array<int, class-string>>
1616
*/
1717
protected $listen = [
1818
Registered::class => [
@@ -22,11 +22,17 @@ class EventServiceProvider extends ServiceProvider
2222

2323
/**
2424
* Register any events for your application.
25-
*
26-
* @return void
2725
*/
28-
public function boot()
26+
public function boot(): void
2927
{
3028
//
3129
}
30+
31+
/**
32+
* Determine if events and listeners should be automatically discovered.
33+
*/
34+
public function shouldDiscoverEvents(): bool
35+
{
36+
return false;
37+
}
3238
}

app/Providers/RouteServiceProvider.php

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,30 @@
1111
class RouteServiceProvider extends ServiceProvider
1212
{
1313
/**
14-
* The path to the "home" route for your application.
14+
* The path to your application's "home" route.
1515
*
16-
* This is used by Laravel authentication to redirect users after login.
16+
* Typically, users are redirected here after authentication.
1717
*
1818
* @var string
1919
*/
2020
public const HOME = '/home';
2121

2222
/**
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
23+
* Define your route model bindings, pattern filters, and other route configuration.
3524
*/
36-
public function boot()
25+
public function boot(): void
3726
{
38-
$this->configureRateLimiting();
27+
RateLimiter::for('api', function (Request $request) {
28+
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
29+
});
3930

4031
$this->routes(function () {
41-
Route::prefix('api')
42-
->middleware('api')
43-
->namespace($this->namespace)
32+
Route::middleware('api')
33+
->prefix('api')
4434
->group(base_path('routes/api.php'));
4535

4636
Route::middleware('web')
47-
->namespace($this->namespace)
4837
->group(base_path('routes/web.php'));
4938
});
5039
}
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-
}
6340
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"laravel/framework": "^10.0",
1818
"laravel/sanctum": "^3.2",
1919
"laravel/tinker": "^2.5",
20+
"laravel/ui": "^4.5",
2021
"maatwebsite/excel": "^3.1",
2122
"prettus/l5-repository": "^2.7.9"
2223
},

composer.lock

Lines changed: 64 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@
4444

4545
'debug' => (bool) env('APP_DEBUG', false),
4646

47-
/*
48-
Application Version
49-
*/
50-
'version' => env('APP_VERSION'),
51-
5247
/*
5348
|--------------------------------------------------------------------------
5449
| Application URL

0 commit comments

Comments
 (0)