Skip to content

Commit

Permalink
laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
liorocks2 committed May 20, 2024
1 parent dc64069 commit 0ccf8f0
Show file tree
Hide file tree
Showing 100 changed files with 2,994 additions and 5,397 deletions.
45 changes: 35 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,66 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file
APP_MAINTENANCE_STORE=database

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=sqlite
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=pingcrm
#DB_USERNAME=root
#DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
BROADCAST_CONNECTION=log
CACHE_STORE=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

SENTRY_LARAVEL_DSN=
MIX_SENTRY_LARAVEL_DSN="${SENTRY_LARAVEL_DSN}"
VITE_APP_NAME="${APP_NAME}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
42 changes: 0 additions & 42 deletions app/Console/Kernel.php

This file was deleted.

70 changes: 0 additions & 70 deletions app/Exceptions/Handler.php

This file was deleted.

32 changes: 0 additions & 32 deletions app/Http/Controllers/Auth/ForgotPasswordController.php

This file was deleted.

59 changes: 34 additions & 25 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,48 @@

namespace App\Http\Controllers\Auth;

use Inertia\Inertia;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\URL;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Response;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use App\Http\Requests\Auth\LoginRequest;
use App\Providers\AppServiceProvider;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Inertia\Inertia;
use Inertia\Response;

class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/

use AuthenticatesUsers;
/**
* Display the login view.
*/
public function create(): Response
{
return Inertia::render('Auth/Login');
}

/**
* Where to redirect users after login.
*
* @var string
* Handle an incoming authentication request.
*/
protected $redirectTo = '/';
public function store(LoginRequest $request): RedirectResponse
{
$request->authenticate();

public function showLoginForm()
$request->session()->regenerate();

return redirect()->intended(AppServiceProvider::HOME);
}

/**
* Destroy an authenticated session.
*/
public function destroy(Request $request): RedirectResponse
{
return Inertia::render('Auth/Login');
Auth::guard('web')->logout();

$request->session()->invalidate();

$request->session()->regenerateToken();

return redirect('/');
}
}
72 changes: 0 additions & 72 deletions app/Http/Controllers/Auth/RegisterController.php

This file was deleted.

Loading

0 comments on commit 0ccf8f0

Please sign in to comment.