Skip to content

Commit

Permalink
Merge pull request #37 from shevelev-anatoliy/update-laravel
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to authored Aug 10, 2024
2 parents 8636d3f + f77d5f8 commit 3bd1fcd
Show file tree
Hide file tree
Showing 67 changed files with 441 additions and 555 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
Expand Down
15 changes: 11 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
Expand All @@ -46,7 +46,14 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_APP_NAME="${APP_NAME}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
14 changes: 10 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
* text=auto eol=lf

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
composer.lock
Expand Down
7 changes: 1 addition & 6 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
php:
preset: laravel
version: 8
disabled:
- no_unused_imports
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
js: true
css: true
18 changes: 2 additions & 16 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,18 @@

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
protected function commands(): void
{
$this->load(__DIR__.'/Commands');

Expand Down
17 changes: 3 additions & 14 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,9 @@
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
* The list of the inputs that are never flashed to the session on validation exceptions.
*
* @var string[]
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var string[]
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
Expand All @@ -29,10 +20,8 @@ class Handler extends ExceptionHandler

/**
* Register the exception handling callbacks for the application.
*
* @return void
*/
public function register()
public function register(): void
{
$this->reportable(function (Throwable $e) {
//
Expand Down
15 changes: 0 additions & 15 deletions app/Http/Controllers/Api/V1/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
Expand All @@ -20,9 +18,6 @@ public function index()

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
Expand All @@ -35,9 +30,6 @@ public function store(Request $request)

/**
* Display the specified resource.
*
* @param User $user
* @return \Illuminate\Http\Response
*/
public function show(User $user)
{
Expand All @@ -46,10 +38,6 @@ public function show(User $user)

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param User $user
* @return \Illuminate\Http\Response
*/
public function update(Request $request, User $user)
{
Expand All @@ -62,9 +50,6 @@ public function update(Request $request, User $user)

/**
* Remove the specified resource from storage.
*
* @param User $user
* @return \Illuminate\Http\Response
*/
public function destroy(User $user)
{
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
use AuthorizesRequests, ValidatesRequests;
}
4 changes: 2 additions & 2 deletions app/Http/Controllers/EloquentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function task3()
]);
}

public function task4($id)
public function task4(int $id)
{
// TODO Eloquent Задание 4: Найти Item по id и передать во view либо отдать 404 страницу
// Одна строка кода вместо []
Expand All @@ -49,7 +49,7 @@ public function task5(Request $request)
return redirect('/');
}

public function task6($id, Request $request)
public function task6(int $id, Request $request)
{
$product = Item::findOrFail($id);
// TODO Eloquent Задание 6: В запросе будет все необходимое для обновления записи
Expand Down
28 changes: 4 additions & 24 deletions app/Http/Controllers/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ class ItemController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
Expand All @@ -19,8 +17,6 @@ public function index()

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
Expand All @@ -29,9 +25,6 @@ public function create()

/**
* Store a newly created resource in storage.
*
* @param ItemStoreRequest $request
* @return \Illuminate\Http\Response
*/
public function store(ItemStoreRequest $request)
{
Expand All @@ -40,45 +33,32 @@ public function store(ItemStoreRequest $request)

/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
public function show(int $id)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
public function edit(int $id)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
public function update(Request $request, int $id)
{
//
}

/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
public function destroy(int $id)
{
//
}
Expand Down
20 changes: 0 additions & 20 deletions app/Http/Controllers/UserCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ class UserCrudController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
Expand All @@ -21,8 +19,6 @@ public function index()

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
Expand All @@ -31,9 +27,6 @@ public function create()

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
Expand All @@ -48,9 +41,6 @@ public function store(Request $request)

/**
* Display the specified resource.
*
* @param User $user
* @return \Illuminate\Http\Response
*/
public function show(User $user)
{
Expand All @@ -59,9 +49,6 @@ public function show(User $user)

/**
* Show the form for editing the specified resource.
*
* @param User $user
* @return \Illuminate\Http\Response
*/
public function edit(User $user)
{
Expand All @@ -70,10 +57,6 @@ public function edit(User $user)

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param User $user
* @return \Illuminate\Http\Response
*/
public function update(Request $request, User $user)
{
Expand All @@ -88,9 +71,6 @@ public function update(Request $request, User $user)

/**
* Remove the specified resource from storage.
*
* @param User $user
* @return \Illuminate\Http\Response
*/
public function destroy(User $user)
{
Expand Down
Loading

0 comments on commit 3bd1fcd

Please sign in to comment.