-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth #13
Open
bdemirpolat
wants to merge
16
commits into
emir:master
Choose a base branch
from
bdemirpolat:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Auth #13
Changes from 2 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5915f6f
Auth
bdemirpolat c54db58
Auth Complete
bdemirpolat 3af3f25
AppServiceProvider.php
bdemirpolat 902bad8
Verify Email
bdemirpolat cff2cd4
Add files via upload
bdemirpolat 36c5474
Delete .env
bdemirpolat faed522
Update .env.example
bdemirpolat ee22abd
Fix middleware group to auth
bdemirpolat 29b1673
Update VerificationController
bdemirpolat 240c218
Update VerificationController.php
bdemirpolat 5897dd0
Update User.php
bdemirpolat 2d8dda6
Update LoginController.php
bdemirpolat 04fe523
Password Reset Complete
bdemirpolat 8227ae5
test
bdemirpolat 442646d
Test 2
bdemirpolat 72ae197
Update Laravel Socialite 4.0
bdemirpolat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails; | ||
|
||
class ForgotPasswordController extends Controller | ||
{ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Password Reset Controller | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This controller is responsible for handling password reset emails and | ||
| includes a trait which assists in sending these notifications from | ||
| your application to your users. Feel free to explore this trait. | ||
| | ||
*/ | ||
|
||
use SendsPasswordResetEmails; | ||
|
||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->middleware('guest'); | ||
} | ||
} |
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,77 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\User; | ||
use App\Http\Controllers\Controller; | ||
use Illuminate\Support\Facades\Hash; | ||
use Illuminate\Support\Facades\Validator; | ||
use Illuminate\Foundation\Auth\RegistersUsers; | ||
|
||
class RegisterController extends Controller | ||
{ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Register Controller | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This controller handles the registration of new users as well as their | ||
| validation and creation. By default this controller uses a trait to | ||
| provide this functionality without requiring any additional code. | ||
| | ||
*/ | ||
|
||
use RegistersUsers; | ||
|
||
/** | ||
* Where to redirect users after registration. | ||
* | ||
* @var string | ||
*/ | ||
protected $redirectTo = '/home'; | ||
|
||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->middleware('guest'); | ||
} | ||
|
||
/** | ||
* Get a validator for an incoming registration request. | ||
* | ||
* @param array $data | ||
* @return \Illuminate\Contracts\Validation\Validator | ||
*/ | ||
protected function validator(array $data) | ||
{ | ||
return Validator::make($data, [ | ||
'name' => ['required', 'string', 'max:255'], | ||
'username' => ['required', 'string', 'max:255'], | ||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], | ||
'password' => ['required', 'string', 'min:6'], | ||
]); | ||
} | ||
|
||
/** | ||
* Create a new user instance after a valid registration. | ||
* | ||
* @param array $data | ||
* @return \App\User | ||
*/ | ||
protected function create(array $data) | ||
{ | ||
$user = new User([ | ||
'name' => $data['name'], | ||
'username' => $data['username'], | ||
'email' => $data['email'], | ||
'password' => bcrypt($data['password']), | ||
]); | ||
$user->save(); | ||
|
||
return $user; | ||
} | ||
} |
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,39 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use Illuminate\Foundation\Auth\ResetsPasswords; | ||
|
||
class ResetPasswordController extends Controller | ||
{ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Password Reset Controller | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This controller is responsible for handling password reset requests | ||
| and uses a simple trait to include this behavior. You're free to | ||
| explore this trait and override any methods you wish to tweak. | ||
| | ||
*/ | ||
|
||
use ResetsPasswords; | ||
|
||
/** | ||
* Where to redirect users after resetting their password. | ||
* | ||
* @var string | ||
*/ | ||
protected $redirectTo = '/home'; | ||
|
||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->middleware('guest'); | ||
} | ||
} |
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\Http\Controllers\Auth; | ||
|
||
use App\Http\Controllers\Controller; | ||
use Illuminate\Foundation\Auth\VerifiesEmails; | ||
|
||
class VerificationController extends Controller | ||
{ | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| Email Verification Controller | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This controller is responsible for handling email verification for any | ||
| user that recently registered with the application. Emails may also | ||
| be re-sent if the user didn't receive the original email message. | ||
| | ||
*/ | ||
|
||
use VerifiesEmails; | ||
|
||
/** | ||
* Where to redirect users after verification. | ||
* | ||
* @var string | ||
*/ | ||
protected $redirectTo = '/home'; | ||
|
||
/** | ||
* Create a new controller instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->middleware('auth'); | ||
$this->middleware('signed')->only('verify'); | ||
$this->middleware('throttle:6,1')->only('verify', 'resend'); | ||
} | ||
} |
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
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
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
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
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
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,72 @@ | ||
@extends('layouts.app') | ||
|
||
@section('content') | ||
<div class="container"> | ||
<div class="row cardRow" > | ||
<h2 class="text-center">{{ __('Login') }}</h2> | ||
<div class="col-md-8 formDiv" > | ||
<div class="card"> | ||
<div class="card-body"> | ||
<form method="POST" action="{{ route('login') }}"> | ||
@csrf | ||
|
||
<div class="form-group row"> | ||
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> | ||
|
||
<div class="col-md-6"> | ||
<input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required autofocus> | ||
|
||
@if ($errors->has('email')) | ||
<span class="invalid-feedback" role="alert"> | ||
<strong>{{ $errors->first('email') }}</strong> | ||
</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="form-group row"> | ||
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label> | ||
|
||
<div class="col-md-6"> | ||
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required> | ||
|
||
@if ($errors->has('password')) | ||
<span class="invalid-feedback" role="alert"> | ||
<strong>{{ $errors->first('password') }}</strong> | ||
</span> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="form-group row"> | ||
<div class="col-md-6 col-md-6 col-md-push-4"> | ||
<div class="form-check"> | ||
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}> | ||
|
||
<label class="form-check-label" for="remember"> | ||
{{ __('Remember Me') }} | ||
</label> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group row mb-0"> | ||
<div class="col-md-8 col-md-6 col-md-push-4"> | ||
<button type="submit" class="btn btn-primary"> | ||
{{ __('Login') }} | ||
</button> | ||
|
||
@if (Route::has('password.request')) | ||
<a class="btn btn-link" href="{{ route('password.request') }}"> | ||
{{ __('Forgot Your Password?') }} | ||
</a> | ||
@endif | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
@endsection |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bdemirpolat Burak migration'da herhangi bir değişiklik yapılacağı zaman yeni bir migration oluşturup yapman gerekiyor ki daha önce dotCFP'i kurmuş kişiler etkilenmesin. Örneğin cfp.phpkonf.org'da biz bu migration'ı çalıştırdık ve users tablosuna kayıtlar girildi. Ben yeniden bu migration'ı çalıştırmak için migrate:refresh gibi bir komut verirsem verileri kaybederim. Ama aşağıdaki gibi yeni bir migration oluşturup eklersen yeni eklediğin password alanını da kullanabiliyor olurum.
php artisan make:migration add_password_to_users_table