app/Http/Controllers/TagController.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(CreateTagRequest $request)
    {
        $tag = new Tag;
           $tag->name = $request->name;
        $tag->save();
        Log::info(Auth::user()->username . " (" . Auth::user()->id . ") CREATED tag (" . $tag->id . ")\r\n", 
            [json_decode($tag, true)]
        );
        Session::flash('success', 'New tag ' . $tag->name . ' was successfully created!');
        return redirect()->route('tags.index');
    }
public function store ( CreateTagRequest $ request ) { $ tag = new Tag ; $ tag -> name = $ request -> name ; $ tag -> save ( ) ; Log :: info ( Auth :: user ( ) -> username . "  ( " . Auth :: user ( ) -> id . " ) CREATED tag ( " . $ tag -> id . " ) \r \n " , [ json_decode ( $ tag , true ) ] ) ; Session :: flash ( 'success' , 'New tag ' . $ tag -> name . ' was successfully created!' ) ; return redirect ( ) -> route ( 'tags.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
// Save entry to log file using built-in Monolog