skip to Main Content

Laravel mysql order by with wherehas

I have 2 tables :- users - id,name,email, mobile user_info - id,user_id, store_name, startup_date User Model class EloquentUser extends Model { protected $table = 'users'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable…

VIEW QUESTION

Can Laravel 9 replace interface implementation in tests?

Here is an example of how I declared my configuration for MyService public function register(): void { $this->app->when(MyService::class) ->needs(IUser::class) ->give(fn (Application $app) => $app->make(ICompanyUserProvider::class)->getCompanyUser()); } So I want to replace ICompanyUserProvider implementation for testing purposes. I have already seen a…

VIEW QUESTION

Laravel FormRequest Before Validation

I was looking for a way to validate some logic before the formRequest validation but i couldn't find anything. Does it have some similar hook like after() within the withValidator method or maybe the constructor? MyController: class MyController extends Controller…

VIEW QUESTION
Back To Top
Search