app/Http/Controllers/__Old__/__CategoryController.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()
    {
        $modules = Module::orderBy('name')->get();
        $moduls = [];
        foreach ($modules as $module) {
            $moduls[$module->id] = $module->name;
        }
        return view('categories.create')->withModules($moduls);
    }
public function create ( ) { $ modules = Module :: orderBy ( 'name' ) -> get ( ) ; $ moduls = [ ] ; foreach ( $ modules as $ module ) { $ moduls [ $ module -> id ] = $ module -> name ; } return view ( 'categories.create' ) -> withModules ( $ moduls ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .
// Store the category values into the $cats array