app/Http/Controllers/ClassController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Classes  $classes
     * @return \Illuminate\Http\Response
     */
Show the form for editing the specified resource.
Show the form for editing the specified resource .
public function edit(Classes  $classes, $slug)
    {
        $model = Classes::where('slug', $slug)->first();
        if ($model == null) {
            return redirect()->route('class');
        }
        return view('classes.edit', ['item' => $model]);
    }
public function edit ( Classes $ classes , $ slug ) { $ model = Classes :: where ( 'slug' , $ slug ) -> first ( ) ; if ( $ model == null ) { return redirect ( ) -> route ( 'class' ) ; } return view ( 'classes.edit' , [ 'item' => $ model ] ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .
/**
         * if the item has been removed
         */