i have a problem with laravel 5.4
when a change the view, the session expires and redirect to login view, and i login again, and redirect to view, but if i access other view, again, redirect to login... Whats wrong with my code?
propertyController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PropertyController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
return view('pages.propertyList');
}
public function list()
{
return view('pages.propertyList');
}
public function new()
{
return view('pages.propertyForm');
}
public function edit()
{
return view('pages.propertyList');
}
public function remove()
{
return view('pages.propertyList');
}
}
web.php
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
Route::get('/property', 'PropertyController@list')->name('propertyList');
Route::get('/property/new', 'PropertyController@new')->name('propertyNew');
Route::get('/property/edit', 'PropertyController@edit')->name('propertyEdit');
navbar.blade.php
@if (Route::has('login'))
@if (Auth::check())
<li class="active"><a href="">Home</a></li>
<li><a href="">Property</a></li>
<li><a href="">Sair</a></li>
@else
<li><a href="">Login</a></li>
<li><a href="">Register</a></li>
@endif
@endif
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tYu3iu
via IFTTT
Aucun commentaire:
Enregistrer un commentaire