forked from EotvosCollegium/pluto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base laravel project with Breeze set up and Materialize installed...
- Loading branch information
Showing
126 changed files
with
238,249 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[docker-compose.yml] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
APP_NAME=Laravel | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_URL=http://localhost | ||
|
||
LOG_CHANNEL=stack | ||
LOG_LEVEL=debug | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=homestead | ||
DB_USERNAME=homestead | ||
DB_PASSWORD=secret | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
FILESYSTEM_DRIVER=local | ||
QUEUE_CONNECTION=sync | ||
SESSION_DRIVER=file | ||
SESSION_LIFETIME=120 | ||
|
||
MEMCACHED_HOST=127.0.0.1 | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* text=auto | ||
*.css linguist-vendored | ||
*.scss linguist-vendored | ||
*.js linguist-vendored | ||
CHANGELOG.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
php: | ||
preset: laravel | ||
version: 8 | ||
disabled: | ||
- no_unused_imports | ||
finder: | ||
not-name: | ||
- index.php | ||
- server.php | ||
js: | ||
finder: | ||
not-name: | ||
- webpack.mix.js | ||
css: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace App\Console; | ||
|
||
use Illuminate\Console\Scheduling\Schedule; | ||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
|
||
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) | ||
{ | ||
// $schedule->command('inspire')->hourly(); | ||
} | ||
|
||
/** | ||
* Register the commands for the application. | ||
* | ||
* @return void | ||
*/ | ||
protected function commands() | ||
{ | ||
$this->load(__DIR__.'/Commands'); | ||
|
||
require base_path('routes/console.php'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace App\Exceptions; | ||
|
||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | ||
use Throwable; | ||
|
||
class Handler extends ExceptionHandler | ||
{ | ||
/** | ||
* A list of the exception types that are not reported. | ||
* | ||
* @var array | ||
*/ | ||
protected $dontReport = [ | ||
// | ||
]; | ||
|
||
/** | ||
* A list of the inputs that are never flashed for validation exceptions. | ||
* | ||
* @var array | ||
*/ | ||
protected $dontFlash = [ | ||
'current_password', | ||
'password', | ||
'password_confirmation', | ||
]; | ||
|
||
/** | ||
* Register the exception handling callbacks for the application. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
$this->reportable(function (Throwable $e) { | ||
// | ||
}); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
app/Http/Controllers/Auth/AuthenticatedSessionController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Http\Requests\Auth\LoginRequest; | ||
use App\Providers\RouteServiceProvider; | ||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Auth; | ||
|
||
class AuthenticatedSessionController extends Controller | ||
{ | ||
/** | ||
* Display the login view. | ||
* | ||
* @return \Illuminate\View\View | ||
*/ | ||
public function create() | ||
{ | ||
return view('auth.login'); | ||
} | ||
|
||
/** | ||
* Handle an incoming authentication request. | ||
* | ||
* @param \App\Http\Requests\Auth\LoginRequest $request | ||
* @return \Illuminate\Http\RedirectResponse | ||
*/ | ||
public function store(LoginRequest $request) | ||
{ | ||
$request->authenticate(); | ||
|
||
$request->session()->regenerate(); | ||
|
||
return redirect()->intended(RouteServiceProvider::HOME); | ||
} | ||
|
||
/** | ||
* Destroy an authenticated session. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Illuminate\Http\RedirectResponse | ||
*/ | ||
public function destroy(Request $request) | ||
{ | ||
Auth::guard('web')->logout(); | ||
|
||
$request->session()->invalidate(); | ||
|
||
$request->session()->regenerateToken(); | ||
|
||
return redirect('/'); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
app/Http/Controllers/Auth/ConfirmablePasswordController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Providers\RouteServiceProvider; | ||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Auth; | ||
use Illuminate\Validation\ValidationException; | ||
|
||
class ConfirmablePasswordController extends Controller | ||
{ | ||
/** | ||
* Show the confirm password view. | ||
* | ||
* @return \Illuminate\View\View | ||
*/ | ||
public function show() | ||
{ | ||
return view('auth.confirm-password'); | ||
} | ||
|
||
/** | ||
* Confirm the user's password. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return mixed | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
if (! Auth::guard('web')->validate([ | ||
'email' => $request->user()->email, | ||
'password' => $request->password, | ||
])) { | ||
throw ValidationException::withMessages([ | ||
'password' => __('auth.password'), | ||
]); | ||
} | ||
|
||
$request->session()->put('auth.password_confirmed_at', time()); | ||
|
||
return redirect()->intended(RouteServiceProvider::HOME); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
app/Http/Controllers/Auth/EmailVerificationNotificationController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Providers\RouteServiceProvider; | ||
use Illuminate\Http\Request; | ||
|
||
class EmailVerificationNotificationController extends Controller | ||
{ | ||
/** | ||
* Send a new email verification notification. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Illuminate\Http\RedirectResponse | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
if ($request->user()->hasVerifiedEmail()) { | ||
return redirect()->intended(RouteServiceProvider::HOME); | ||
} | ||
|
||
$request->user()->sendEmailVerificationNotification(); | ||
|
||
return back()->with('status', 'verification-link-sent'); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
app/Http/Controllers/Auth/EmailVerificationPromptController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use App\Providers\RouteServiceProvider; | ||
use Illuminate\Http\Request; | ||
|
||
class EmailVerificationPromptController extends Controller | ||
{ | ||
/** | ||
* Display the email verification prompt. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return mixed | ||
*/ | ||
public function __invoke(Request $request) | ||
{ | ||
return $request->user()->hasVerifiedEmail() | ||
? redirect()->intended(RouteServiceProvider::HOME) | ||
: view('auth.verify-email'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use Illuminate\Auth\Events\PasswordReset; | ||
use Illuminate\Http\Request; | ||
use Illuminate\Support\Facades\Hash; | ||
use Illuminate\Support\Facades\Password; | ||
use Illuminate\Support\Str; | ||
use Illuminate\Validation\Rules; | ||
|
||
class NewPasswordController extends Controller | ||
{ | ||
/** | ||
* Display the password reset view. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Illuminate\View\View | ||
*/ | ||
public function create(Request $request) | ||
{ | ||
return view('auth.reset-password', ['request' => $request]); | ||
} | ||
|
||
/** | ||
* Handle an incoming new password request. | ||
* | ||
* @param \Illuminate\Http\Request $request | ||
* @return \Illuminate\Http\RedirectResponse | ||
* | ||
* @throws \Illuminate\Validation\ValidationException | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
$request->validate([ | ||
'token' => 'required', | ||
'email' => 'required|email', | ||
'password' => ['required', 'confirmed', Rules\Password::defaults()], | ||
]); | ||
|
||
// Here we will attempt to reset the user's password. If it is successful we | ||
// will update the password on an actual user model and persist it to the | ||
// database. Otherwise we will parse the error and return the response. | ||
$status = Password::reset( | ||
$request->only('email', 'password', 'password_confirmation', 'token'), | ||
function ($user) use ($request) { | ||
$user->forceFill([ | ||
'password' => Hash::make($request->password), | ||
'remember_token' => Str::random(60), | ||
])->save(); | ||
|
||
event(new PasswordReset($user)); | ||
} | ||
); | ||
|
||
// If the password was successfully reset, we will redirect the user back to | ||
// the application's home authenticated view. If there is an error we can | ||
// redirect them back to where they came from with their error message. | ||
return $status == Password::PASSWORD_RESET | ||
? redirect()->route('login')->with('status', __($status)) | ||
: back()->withInput($request->only('email')) | ||
->withErrors(['email' => __($status)]); | ||
} | ||
} |
Oops, something went wrong.