Skip to content

Commit 6843a9e

Browse files
authored
Merge pull request #14 from gdarko/shift-120752
Upgrade to Laravel 11
2 parents fa5f6fb + 38f858f commit 6843a9e

File tree

96 files changed

+789
-2719
lines changed

Some content is hidden

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

96 files changed

+789
-2719
lines changed

.env.example

+41-25
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,68 @@ APP_NAME=Laravel
22
APP_ENV=local
33
APP_KEY=
44
APP_DEBUG=true
5-
APP_LOCALE=en
65
APP_TIMEZONE=UTC
7-
APP_URL=http://yourdomain.test
8-
APP_LOGO=/assets/images/logo.png
6+
APP_URL=http://localhost
7+
8+
APP_LOCALE=en
9+
APP_FALLBACK_LOCALE=en
10+
APP_FAKER_LOCALE=en_US
11+
12+
APP_MAINTENANCE_DRIVER=file
13+
APP_MAINTENANCE_STORE=database
14+
15+
BCRYPT_ROUNDS=12
916

1017
LOG_CHANNEL=stack
18+
LOG_STACK=single
19+
LOG_DEPRECATIONS_CHANNEL=null
1120
LOG_LEVEL=debug
1221

13-
DB_CONNECTION=mysql
14-
DB_HOST=localhost
15-
DB_PORT=3306
16-
DB_DATABASE=homestead
17-
DB_USERNAME=vagrant
18-
DB_PASSWORD=secret
19-
20-
BROADCAST_DRIVER=log
21-
CACHE_DRIVER=file
22-
QUEUE_CONNECTION=sync
23-
SESSION_DRIVER=file
22+
DB_CONNECTION=sqlite
23+
# DB_HOST=127.0.0.1
24+
# DB_PORT=3306
25+
# DB_DATABASE=laravel
26+
# DB_USERNAME=root
27+
# DB_PASSWORD=
28+
29+
SESSION_DRIVER=database
2430
SESSION_LIFETIME=120
31+
SESSION_ENCRYPT=false
32+
SESSION_PATH=/
33+
SESSION_DOMAIN=null
34+
35+
BROADCAST_CONNECTION=log
36+
FILESYSTEM_DISK=local
37+
QUEUE_CONNECTION=database
2538

26-
MEMCACHED_HOST=memcached
39+
CACHE_STORE=database
40+
CACHE_PREFIX=
2741

28-
REDIS_HOST=redis
42+
MEMCACHED_HOST=127.0.0.1
43+
44+
REDIS_CLIENT=phpredis
45+
REDIS_HOST=127.0.0.1
2946
REDIS_PASSWORD=null
3047
REDIS_PORT=6379
3148

32-
MAIL_MAILER=smtp
33-
MAIL_HOST=localhost
34-
MAIL_PORT=1025
49+
MAIL_MAILER=log
50+
MAIL_HOST=127.0.0.1
51+
MAIL_PORT=2525
3552
MAIL_USERNAME=null
3653
MAIL_PASSWORD=null
3754
MAIL_ENCRYPTION=null
38-
MAIL_FROM_ADDRESS=test@test.com
55+
MAIL_FROM_ADDRESS="hello@example.com"
3956
MAIL_FROM_NAME="${APP_NAME}"
4057

4158
AWS_ACCESS_KEY_ID=
4259
AWS_SECRET_ACCESS_KEY=
4360
AWS_DEFAULT_REGION=us-east-1
4461
AWS_BUCKET=
62+
AWS_USE_PATH_STYLE_ENDPOINT=false
4563

46-
PUSHER_APP_ID=
47-
PUSHER_APP_KEY=
48-
PUSHER_APP_SECRET=
49-
PUSHER_APP_CLUSTER=mt1
64+
VITE_APP_NAME="${APP_NAME}"
5065

66+
# Customizations
67+
APP_LOGO=/assets/images/logo.png
5168
SANCTUM_STATEFUL_DOMAINS=yourdomain.test
5269
SESSION_DOMAIN=yourdomain.test
53-
SPA_URL="${APP_URL}"

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.phpunit.cache
12
/node_modules
23
/public/build
34
/public/hot
@@ -6,12 +7,15 @@
67
/vendor
78
.env
89
.env.backup
10+
.env.production
11+
.phpactor.json
912
.phpunit.result.cache
1013
Homestead.json
1114
Homestead.yaml
1215
auth.json
1316
npm-debug.log
1417
yarn-error.log
18+
/.fleet
1519
/.idea
1620
/.vscode
1721

app/Actions/Fortify/CreateNewUser.php

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class CreateNewUser implements CreatesNewUsers
1515
/**
1616
* Validate and create a newly registered user.
1717
*
18-
* @param array $input
1918
* @return \App\Models\User
2019
*/
2120
public function create(array $input)

app/Actions/Fortify/ResetUserPassword.php

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class ResetUserPassword implements ResetsUserPasswords
1414
* Validate and reset the user's forgotten password.
1515
*
1616
* @param mixed $user
17-
* @param array $input
1817
* @return void
1918
*/
2019
public function reset($user, array $input)

app/Actions/Fortify/UpdateUserPassword.php

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ class UpdateUserPassword implements UpdatesUserPasswords
1414
* Validate and update the user's password.
1515
*
1616
* @param mixed $user
17-
* @param array $input
1817
* @return void
1918
*/
2019
public function update($user, array $input)

app/Actions/Fortify/UpdateUserProfileInformation.php

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class UpdateUserProfileInformation implements UpdatesUserProfileInformation
1313
* Validate and update the given user's profile information.
1414
*
1515
* @param mixed $user
16-
* @param array $input
1716
* @return void
1817
*/
1918
public function update($user, array $input)
@@ -49,7 +48,6 @@ public function update($user, array $input)
4948
* Update the given verified user's profile information.
5049
*
5150
* @param mixed $user
52-
* @param array $input
5351
* @return void
5452
*/
5553
protected function updateVerifiedUser($user, array $input)

app/Console/Kernel.php

-32
This file was deleted.

app/Exceptions/Handler.php

-50
This file was deleted.

app/Http/Controllers/Controller.php

+4-26
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
use Illuminate\Routing\Controller as BaseController;
1111
use Illuminate\Support\Facades\Auth;
1212

13-
class Controller extends BaseController
13+
abstract class Controller extends BaseController
1414
{
1515
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
1616

1717
/**
1818
* Returns the current user
19+
*
1920
* @return User|\Illuminate\Contracts\Auth\Authenticatable|null
2021
*/
2122
protected function getCurrentUser()
@@ -25,7 +26,7 @@ protected function getCurrentUser()
2526

2627
/**
2728
* Send data response
28-
* @param array $data
29+
*
2930
* @return JsonResponse
3031
*/
3132
protected function responseDataSuccess(array $data)
@@ -36,21 +37,16 @@ protected function responseDataSuccess(array $data)
3637
/**
3738
* Send a successful response
3839
*
39-
* @param $data
40-
* @param $code
4140
* @return \Illuminate\Http\JsonResponse
4241
*/
4342
protected function responseDeleteSuccess($data = [], $code = 200)
4443
{
4544
return $this->responseSuccess(trans('frontend.global.phrases.record_deleted'), $data, $code);
4645
}
4746

48-
4947
/**
5048
* Send a failed response
5149
*
52-
* @param array $data
53-
* @param $code
5450
* @return \Illuminate\Http\JsonResponse
5551
*/
5652
protected function responseDeleteFail(array $data = [], int $code = 422)
@@ -61,21 +57,16 @@ protected function responseDeleteFail(array $data = [], int $code = 422)
6157
/**
6258
* Send a successful response
6359
*
64-
* @param $data
65-
* @param $code
6660
* @return \Illuminate\Http\JsonResponse
6761
*/
6862
protected function responseUpdateSuccess($data = [], $code = 200)
6963
{
7064
return $this->responseSuccess(trans('frontend.global.phrases.record_updated'), $data, $code);
7165
}
7266

73-
7467
/**
7568
* Send a failed response
7669
*
77-
* @param array $data
78-
* @param $code
7970
* @return \Illuminate\Http\JsonResponse
8071
*/
8172
protected function responseUpdateFail(array $data = [], int $code = 422)
@@ -86,21 +77,16 @@ protected function responseUpdateFail(array $data = [], int $code = 422)
8677
/**
8778
* Send a successful response
8879
*
89-
* @param $data
90-
* @param $code
9180
* @return \Illuminate\Http\JsonResponse
9281
*/
9382
protected function responseStoreSuccess($data = [], $code = 200)
9483
{
9584
return $this->responseSuccess(trans('frontend.global.phrases.record_created'), $data, $code);
9685
}
9786

98-
9987
/**
10088
* Send a failed response
10189
*
102-
* @param array $data
103-
* @param $code
10490
* @return \Illuminate\Http\JsonResponse
10591
*/
10692
protected function responseStoreFail(array $data = [], int $code = 422)
@@ -111,9 +97,6 @@ protected function responseStoreFail(array $data = [], int $code = 422)
11197
/**
11298
* Send a successful response
11399
*
114-
* @param string $message
115-
* @param array $data
116-
* @param int $code
117100
* @return JsonResponse
118101
*/
119102
protected function responseSuccess(string $message, array $data = [], int $code = 200)
@@ -124,9 +107,6 @@ protected function responseSuccess(string $message, array $data = [], int $code
124107
/**
125108
* Send a failed response
126109
*
127-
* @param string $message
128-
* @param array $data
129-
* @param int $code
130110
* @return \Illuminate\Http\JsonResponse
131111
*/
132112
protected function responseFail(string $message, array $data = [], int $code = 400)
@@ -136,9 +116,7 @@ protected function responseFail(string $message, array $data = [], int $code = 4
136116

137117
/**
138118
* Returns a response
139-
* @param int $code
140-
* @param string $message
141-
* @param array $data
119+
*
142120
* @return JsonResponse
143121
*/
144122
protected function response(int $code, string $message = '', array $data = [])

app/Http/Controllers/RoleController.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ class RoleController extends Controller
1111
{
1212
/**
1313
* The service instance
14+
*
1415
* @var RoleService
1516
*/
1617
protected $roleService;
1718

1819
/**
1920
* Constructor
20-
* @param RoleService $service
2121
*/
2222
public function __construct(RoleService $service)
2323
{
@@ -26,12 +26,15 @@ public function __construct(RoleService $service)
2626

2727
/**
2828
* Handle search data
29+
*
2930
* @return \Illuminate\Http\Resources\Json\AnonymousResourceCollection
31+
*
3032
* @throws AuthorizationException
3133
*/
3234
public function search(Request $request)
3335
{
3436
$this->authorize('search', Role::class);
37+
3538
return $this->roleService->index($request->all());
3639
}
3740
}

0 commit comments

Comments
 (0)