product_id == $_POST['id']
nullable()->default(null)
$image = $request->file('avatar');
$fileName = time() . '.' . $image->getClientOriginalExtension();
$img1 = Image::make($image->getRealPath());
$img1->stream(); // <-- Key point
Storage::disk('local')->put('public/images/avatars/' .auth()->id() . '/' . $fileName.$image->getClientOriginalExtension(), $img1, 'public');
$img2 = Image::make($image->getRealPath());
$img2->resize(64, 64, function ($constraint) {
$constraint->aspectRatio();
});
$img2->stream(); // <-- Key point
Storage::disk('local')->put('public/images/avatars/' .auth()->id() . '/' . $fileName.'_x64'.'.'.$image->getClientOriginalExtension(), $img2, 'public');
$img3 = Image::make($image->getRealPath());
$img3->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
});
$img3->stream(); // <-- Key point
Storage::disk('local')->put('public/images/avatars/' .auth()->id() . '/' . $fileName.'_x300'.'.'.$image->getClientOriginalExtension(), $img3, 'public');
$user->avatar = $fileName;
$user->save();
SELECT * FROM articles WHERE id < :id
$text= '';
foreach($articles as $article) {
$text.="<a href='/articles/$article['id']'>$article['title']</a>"
}
SELECT * FROM table WHERE param='[1,1,1]' OR param='[1,2,2]' OR param='[1,1,2]'