app/Http/Controllers/__Old__/__ModuleController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(CreateModuleRequest $request)
    {
        $module = new Module;
            $module->name = $request->name;
        $module->save();
        Log::info(Auth::user()->username . " (" . Auth::user()->id . ") CREATED module (" . $module->id . ")\r\n", 
            [json_decode($module, true)]
        );
        Session::flash('success','The new module has been created');
        return redirect()->route('modules.index');
    }
public function store ( CreateModuleRequest $ request ) { $ module = new Module ; $ module -> name = $ request -> name ; $ module -> save ( ) ; Log :: info ( Auth :: user ( ) -> username . "  ( " . Auth :: user ( ) -> id . " ) CREATED module ( " . $ module -> id . " ) \r \n " , [ json_decode ( $ module , true ) ] ) ; Session :: flash ( 'success' , 'The new module has been created' ) ; return redirect ( ) -> route ( 'modules.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// Save entry to log file using built-in Monolog