app/Http/Controllers/RoleController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create()
    {
        $users = Permission::where('tag','users')->get();
        $products = Permission::where('tag','products')->get();
        $roles = Permission::where('tag','roles')->get();
        $permissions[0]= $users;
        $permissions[1]= $products;
        $permissions[2]= $roles;
        return view('roles.create',compact('permissions'));
    }
public function create ( ) { $ users = Permission :: where ( 'tag' , 'users' ) -> get ( ) ; $ products = Permission :: where ( 'tag' , 'products' ) -> get ( ) ; $ roles = Permission :: where ( 'tag' , 'roles' ) -> get ( ) ; $ permissions [ 0 ] = $ users ; $ permissions [ 1 ] = $ products ; $ permissions [ 2 ] = $ roles ; return view ( 'roles.create' , compact ( 'permissions' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .