forked from acearo/base-laravel
added recipe link to navigation finally
This commit is contained in:
parent
55c42dc043
commit
feb8b6d0d9
3 changed files with 16 additions and 1 deletions
|
@ -25,7 +25,7 @@ class LoginController extends Controller
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/admin';
|
||||
protected $redirectTo = '/recipes';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
|
|
@ -10,6 +10,20 @@ use App\User;
|
|||
|
||||
class RecipeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Enforce middleware
|
||||
*/
|
||||
public function __construct(){
|
||||
$this->middleware('auth', ['except' => ['index','show']]);
|
||||
|
||||
$this->middleware(['permissions:CreateUser.EditUser.DeleteUser.AssignRole'], ['only' => ['index','show']]);
|
||||
$this->middleware(['permissions:DeleteUser'], ['only' => ['destroy']]);
|
||||
}
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$recipes = Recipe::with('user')->get();
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
@else
|
||||
<!-- Standard Links -->
|
||||
@include('layouts.segments.link', ['route'=>'home','text'=>'Home'])
|
||||
@include('layouts.segments.link', ['route'=>'recipes.index','text'=>'Recipes'])
|
||||
|
||||
<!-- Authentication Links -->
|
||||
@guest
|
||||
|
|
Loading…
Add table
Reference in a new issue