app/Http/Controllers/Admin/StoreController.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()
    {
        if(!Auth::user()->store()->count())
        {
            flash('Voce ja possui uma loja!')->warning();
            return redirect()->route('admin.stores.index');
        }
        $user = User::all(['id','name']);
        return view('admin.stores.create',compact('user'));
    }
public function create ( ) { if ( ! Auth :: user ( ) -> store ( ) -> count ( ) ) { flash ( 'Voce ja possui uma loja!' ) -> warning ( ) ; return redirect ( ) -> route ( 'admin.stores.index' ) ; } $ user = User :: all ( [ 'id' , 'name' ] ) ; return view ( 'admin.stores.create' , compact ( 'user' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .