FEATURE: add displaying errors
This commit is contained in:
@@ -39,17 +39,19 @@ class CreateNewStaticPage extends Controller
|
||||
|
||||
$page->user_id = \Auth::user()->id;
|
||||
$page->title = $request->title;
|
||||
$page->url = $request->url;
|
||||
$page->published_from = $request->publishedFrom;
|
||||
$page->published_to = $request->publishedTo;
|
||||
$page->meta_keywords = $request->meta_description;
|
||||
$page->meta_description = $request->meta_description;
|
||||
$page->content = $request->pageContent;
|
||||
$page->status = $request->status;
|
||||
$page->module_handler = config('staticpages.handler');
|
||||
|
||||
$page->save();
|
||||
|
||||
return redirect()
|
||||
->route('staticpages.new')
|
||||
->with('success', trans('admin.successfullyCreated'));
|
||||
->route('staticpage.new')
|
||||
->with('success', trans('staticpages::admin.successfullyCreated'));
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,6 @@ Route::group([
|
||||
->name('staticpage.edit');
|
||||
|
||||
// post method for creating new static page
|
||||
Route::post('new', 'CreateNewStaticPage@getNew')
|
||||
Route::post('new', 'CreateNewStaticPage@postNew')
|
||||
->name('staticpage.newPost');
|
||||
});
|
||||
Reference in New Issue
Block a user