skip to Main Content

Illegal operator and value combination in Laravel 8

Why is there always an error when doing more than seven days? public function paginated(Request $request) { $fromDate = $request->fromDate ? Carbon::parse($request->fromDate) : Carbon::now(); $toDate = $request->toDate ? Carbon::parse($request->toDate) : Carbon::now(); $query = Vehicle::with('make') ->with('class') ->with([ 'status' => function ($query)…

VIEW QUESTION

Override last() method in laravel

I have one to many relations In my User Model public function user_balances(){ return $this->hasMany(UserBalances::class); } In my User Balances Model public function user(){ return $this->belongsTo(UserBalances::class); } So every time I want to retrieve the last record of user balance,…

VIEW QUESTION

Php – Laravel 8 prefix on route not working when placed and url works with prefix if its not on code

I have a routes folder admin.php, with following intended code Route::prefix('admin')->group(function(){ Route::get('/new/dashboard',[SuperAdminController::class,'dashboard']); Route::get('/new/notifications', [SuperAdminController::class,'notifications']); }); But if i go on the browser and use http://127.0.0.1:8000/admin/new/dashboard i get 404 | page not found. But if remove the prefix and the code…

VIEW QUESTION

Adding Server Block on Nginx for WildCard domains

I have 2 domains as D1 "abc.com" and D2 "def.com". I have configured D1 as following sever block on Nginx. server { listen 80; server_name *.abc.com,abc.com; root /var/www/abc/public; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options "nosniff"; index index.php; charset utf-8; location /…

VIEW QUESTION
Back To Top
Search