app/Http/Controllers/Admin/NewsController.php
/**
	 * Store a newly created resource in storage.
	 *
	 * @param  Request  $request
	 * @return Response
	 */
Store a newly created resource in storage.
@param  Request  $request
@return Response
Store a newly created resource in storage . @param Request $request @return Response
public function store(Request $request) {
		$cat_url = str_slug($request->news_tittle);
		$news = News::create([
			'news_tittle' => $request->news_tittle,
			'news_category' => $request->news_category,
			'news_image' => "anh.jpg",
			'news_status' => $request->news_status,
			'news_detail' => $request->news_detail,
			'news_url' => $cat_url,
		]);
		return $news;
	}
public function store ( Request $ request ) { $ cat_url = str_slug ( $ request -> news_tittle ) ; $ news = News :: create ( [ 'news_tittle' => $ request -> news_tittle , 'news_category' => $ request -> news_category , 'news_image' => " anh.jpg " , 'news_status' => $ request -> news_status , 'news_detail' => $ request -> news_detail , 'news_url' => $ cat_url , ] ) ; return $ news ; }
Store a newly created resource in storage.
Store a newly created resource in storage .