auth redirect fixed

This commit is contained in:
merdiano 2019-06-10 16:48:09 +05:00
parent b58c0fe656
commit 9cf0e21607
5 changed files with 8 additions and 5 deletions

View File

@ -35,6 +35,7 @@ class LoginController extends Controller
public function __construct()
{
$this->middleware('guest')->except('logout');
$this->redirectTo = route('home');
}
/**
* Determine if the request field is email or username.
@ -74,10 +75,11 @@ class LoginController extends Controller
{
$field = $this->field($request);
$messages = ["{$this->username()}.exists" => trans('auth.fail')];
$messages = ["{$this->username()}.exists" => trans('auth.failed')];
$this->validate($request, [
$this->username() => "required|exists:users,{$field}",
'password' => 'required',
], $messages);
}
}

View File

@ -38,6 +38,7 @@ class RegisterController extends Controller
public function __construct()
{
$this->middleware('guest');
$this->redirectTo = route('home');
}
/**

View File

@ -13,13 +13,13 @@ return [
|
*/
'failed' => 'These credentials do not match our records.',
'failed' => 'Ulanyjy ýada açar söz nädogry',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
'logout' => 'Çykyş',
'email' => 'E-mail',
'phone' => 'Telefon',
'password' => 'Açar söz',
'sace' => 'Ýatda sakla',
'save' => 'Ýatda sakla',
'login_placeholder' => 'Telefon ýa-da E-mail',
'forget_password' => 'Açar sözi unytdym!',
'first_name' => 'Ady',

View File

@ -14,7 +14,7 @@
<a href="{{route('liked')}}">@lang('content.liked')</a>
</li>
<li class="@if(Route::currentRouteName()=='watched') active @endif" >
<a href="{{route('watched')}}">@lang('watched')</a>
<a href="{{route('watched')}}">@lang('content.watched')</a>
</li>
<li class="" role="presentation">
<a onclick="event.preventDefault();

View File

@ -39,7 +39,7 @@ Route::group(['prefix' => 'video'],function (){
Route::group(['middleware' => ['auth']], function () {
Route::get('/material/{id}/buy','OrderController@buy')->name('buy');
Route::get('/dashboard', 'HomeController@dashboard')->name('dashboard');
// Route::get('/dashboard', 'HomeController@dashboard')->name('dashboard');
Route::get('/profile', 'HomeController@profile')->name('profile');
Route::post('/profile', 'HomeController@profileUpdate')->name('profileUpdate');
Route::get('/bought', 'HomeController@bought_list')->name('bought');