skip to Main Content

Adding Date field in the Registration Form in Laravel

I have an error that says Validation rule date_format requires at least 1 parameters. Then this is my Code under RegisteredUserController.php public function store(Request $request): RedirectResponse { $request->validate([ 'first_name' => ['required', 'string', 'max:255'], 'last_name'=>['required','string','max:255'], 'sex'=>['required','string','max:10'], 'birthdate'=>['required','date_format'], 'email' => ['required', 'string',…

VIEW QUESTION

Laravel Controller not being invoked

I have never used Laravel before and am trying to get my first controller working, using Laravel 10.45.1. The documentation says I should put this in my route file. In my case, I put these lines in /routes/web.php. use AppHttpControllersTestController;…

VIEW QUESTION

Rollback migration in laravel

I want to write down() function in migration and after run rollback command I'm getting error. Migration that i want to rollback looks like this: public function up(): void { Schema::table('posts', function (Blueprint $table) { $table->foreignId('competition_id')->after('content_id')->nullable()->constrained('competitions'); $table->unique(['account_id', 'competition_id']); }); }…

VIEW QUESTION

Laravel – FilamentPHP Select input editing

Heyya, I am working on Select FormsComponentsSelect::make('roles')->options(function (){ $roles = Role::pluck('name'); $filtered_roles = $roles->filter(fn($role)=>$role!='super_admin'); return $filtered_roles; })->searchable()->preload()->multiple() Works great. However on the edit page it doesnt show already defined roles for specific user. Each time it show select one of…

VIEW QUESTION
Back To Top
Search