Skip to content
Advertisement

Tag: laravel

Cannot call abstract method interface in Service-Repository pattern

In my Laravel9 project, I have many controllers that have similar functions like: TestController.php Test1Controller.php So I modified them into: TestController.php Test1Controller.php ApiController.php TestInterface.php BaseInterface.php Then I bind interfaces into services in AppServiceProvider.php, like: TestService.php: Test1Service.php When I call TestController::index on my route, I get: Cannot call abstract method AppContractsTestInterface::index() How can I fix it or do any better suggestions?

I want to add 94 at the beginning of the very number i insert

I want to add 94 at the beginning of the very number I insert from this input area. This is POS system which is written under laravel framwork. screenshot of the area Answer You should change second parameter ‘null’ to ’94’ of Form::text, it’s a default value. You can learn more from laravel’s documentation : https://laravel.com/docs/4.2/html

Laravel Query with Implode

i have an array with values So i want search these three items from tables using like query I tried where(‘primary_skill ‘, ‘like’, ‘%’ . implode(“‘ OR primary_skill LIKE ‘%”, $skill_name) .’%’) which is not working for me.Any help would be highly appreciated. Answer ->where(‘primary_skill ‘, ‘like’, ‘%’ . implode(“‘ OR primary_skill LIKE ‘%”, $skill_name) .’%’) Above line is incorrect

Laravel Action Route not Define

I have unique problem. I already create Route on web.php, on Controller, and Blade. and working on my localhost. but after publish to real server, I jus got error Action urlcontroller@function not define. this is my code. this is my web.php this is my controller and this is code on blade to call controller@function this step same as another controller,

How to make my post featured in Laravel 9

I have made a create post function and I would like to make a certain section only have a featured post. I’m new to laravel and php so was not to sure how to do it. I created a featured column in my db and passed a foreach($posts as $featured) into the section I wanted featured. From my research, the

Advertisement