FROM `alias`
JOIN `items` ON `items`.`product_id` = SUBSTR(`alias`.`field2`, 12)
Route::get('admin/students', 'FrontEndController@updateAvatar')->name('updateAvatar');
<a href="{{ route('updateAvatar') }}">Link name/Embedded Button</a></li>
<a href="{{ action('FrontEndController@updateAvatar') }}">Link name/Embedded Button</a>
- если у тебя FrontEndControllerнаходится в нэймспейсе
App\Http\Controllers
<a href="{{ url('admin/students'') }}">Link name/Embedded Button</a></li>
<a href="/admin/students'">Link name/Embedded Button</a></li>
public function edit($id)
{
$post = Posts::find($id);
$category = DB::table('post_category')->pluck('cat_name', 'id_cat');
return view('admin.posts.editpost', compact('post','category'));
}
public function update(Request $request, $id)
{
$this->validate($request, [
'title' => 'required|max:255',
'short_story' => 'required|unique:posts',
'full_story' => 'required',
'id_cat' => 'required',
'poster' => 'image',
]);
$post->save();
return view('admin.posts.createpost')->withPost($category);
return view('admin.posts.createpost', [
'post' => $category,
]);
return view('admin.posts.createpost', [
'category' => $category,
]);
return view('admin.posts.createpost', compact('category')]);
return view('admin.posts.createpost')->withCategory($category);