\Validator::make($data, $rules, $messages, [
'name' => 'имя',
]);
public function attributes()
{
return ['name' => 'имя'];
}
$value = $modelA->modelB()->where("foo", "bar")->first()->value ?? null;
View::composer('*', function ($view) {
$view->with('menu', /* Ваш запрос для выборки меню */);
});
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);