Gt
parse_url();
https://www.php.net/manual/en/function.parse-url.phpSize: a a a
Gt
parse_url();
https://www.php.net/manual/en/function.parse-url.phpK
K
Gt
K
$url = $video->url;
return view('video.view', compact('video'));
}
K
Gt
K
D
public function verify(User $user)Туда должен приходит post запрос.
{
try {
$user->verify();
return redirect()->route('admin.users.show', $user);
} catch (\DomainException $e) {
return redirect()->route('admin.users.show', $user)->with('error', $e->getMessage());
}
}
Route::post('/users/verify', 'UsersController@verify')->name('users.verify');Запрос приходит, если ползователь уже верифицирован, то должен перенаправлять с флеш сообщением на show.
SN
A
SN
SN
J
SN
$products = Product::whereHas('categories', function($q) use($id) {
$q->where('id', $id);
})->get();
SN
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous (SQL: select * from `products` where exists (select * from `categories` inner join `category_product` on `categories`.`id` = `category_product`.`category_id` where `products`.`id` = `category_product`.`product_id` and `id` = 1))
A
SN
M
$products = Product::whereHas('categories', function($q) use($id) {
$q->where('id', $id);
})->get();