app/Http/Controllers/News/NewsController.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(Request $request)
    {
        $news = News::create($request->all());
        if($news) {
			event(new AddNewsEvent($news));
			return redirect()->route('news.index')
				->with('success', 'Новость успешно добавлена');
		}
		return back()
			->with('error', 'Не удалось добавить новость');
    }
public function store ( Request $ request ) { $ news = News :: create ( $ request -> all ( ) ) ; if ( $ news ) { event ( new AddNewsEvent ( $ news ) ) ; return redirect ( ) -> route ( 'news.index' ) -> with ( 'success' , 'Новость успешно добавлена'); } return back ( ) -> with ( 'error' , 'Не удалось добавить новость'); }
Store a newly created resource in storage.
Store a newly created resource in storage .
//add event