app/Http/Controllers/FrontAulaController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\RedirectResponse
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $aula = new AulaModel($request->all());
        $tm = $aula->id_turma;
        $aula->save();
        flash('Aula adicionada com sucesso!')->success();
        return redirect()->route('turma.show', $tm);
    }
public function store ( Request $ request ) { $ aula = new AulaModel ( $ request -> all ( ) ) ; $ tm = $ aula -> id_turma ; $ aula -> save ( ) ; flash ( 'Aula adicionada com sucesso!' ) -> success ( ) ; return redirect ( ) -> route ( 'turma.show' , $ tm ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .