skip to Main Content

has and doesnotHave methods not exist on DB in Laravel

I need help with the DB query builder. I tried to check if such a relationship already exists but got an error saying Call to undefined method IlluminateDatabaseQueryBuilder::has() $startDate = Carbon::today()->format('Y-m-dT00:00:00'); $endDate = Carbon::today()->format('Y-m-dT23:59:59'); if (request('start_date') && request('end_date')) { $startDate…

VIEW QUESTION

Middleware Laravel 11?

I want to define middleware in my Laravel project, this is my web.php file, when I try to check the auth, I get an error Route [login] not defined. Please help me define middleware in Laravel 11 in the resource…

VIEW QUESTION

Laravel routing conflict to public's folder

I am developing project using laravel and I have directory named 'profile' in public folder. also I have route named /profile also Route::get('/profile', [UserController::class ,'showProfile']); when I visit 'localhost/profile' url, it goes to public/profile folder I have 2 ubuntu server.…

VIEW QUESTION
Back To Top
Search