skip to Main Content

Ignore variable in update Laravel

how i can make variable in Update Statement who is ignored. I tried like this but it doesn't work. $dl = ''; $select = DB::table('Character')->where('Name', '=', $request->char)->first(); if($select->Class == 64 OR $select->Class == 65 OR $select->Class == 66) { $newcom…

VIEW QUESTION

How to group routes by API Laravel?

Here is a route rules: Route::apiResources([ 'profile' => ProfileController::class, 'specialization' => SpecializationController::class, 'specialization/filter' => SpecializationController::class, ]); I try to add a custom route into apiResource above: 'register/code/verify' => [RegisterVerifyController::class, 'verify'] As result I got this: Route::apiResources([ 'profile' => ProfileController::class, 'specialization'…

VIEW QUESTION

difference between two times Laravel Carbon

I want to check difference between two times in Laravel (the day is not needed) Carbon::createFromTimeString($this->debut) ->diffInHours(Carbon::createFromTimeString($this->fin)) if $this->debut = '08:00:00' and $this->fin = '02:00:00' the expected result is 18 but I have 6 How can I get the correct…

VIEW QUESTION

Laravel – how can I return view from another function

Route: Route::controller(PublicController::class)->group(function () { Route::get('/index', 'index')->name('public.index'); }); View: index.blade.php wrong_browser.blade.php In controller, this way is ok: class PublicController extends Controller { public function index(Request $request) { if(is_wrong_browser) return view(public.wrong_browser); return view('public.index'); } } But how can I return view from…

VIEW QUESTION
Back To Top
Search