app/Http/Controllers/StructuresController.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($id)
    {
        $grilles = Grille::orderBy('activite')->get();
        $type = Typecompte::find($id);
        $type_id = $type->id;
        if($type_id == 1){
            return view('structures.create_person', compact('type_id', 'grilles'));
        }
        return view('structures.create', compact('type_id', 'grilles'));
    }
public function create ( $ id ) { $ grilles = Grille :: orderBy ( 'activite' ) -> get ( ) ; $ type = Typecompte :: find ( $ id ) ; $ type_id = $ type -> id ; if ( $ type_id == 1 ) { return view ( 'structures.create_person' , compact ( 'type_id' , 'grilles' ) ) ; } return view ( 'structures.create' , compact ( 'type_id' , 'grilles' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .