function insertNews($news) { $post = News::create($news); return $post->id; }
/** * 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; }