Wednesday, 20 September 2023

Laravel Rule Validations

Laravel validations$errorMessage = "NFL Competition already exist for year $this->year and with the selected competition type.";return [    'name' => 'string',    'abbreviation' => 'required|max:10',    'year' => 'required|digits:4|integer|min:1900|max:' . (date('Y') + 1),    'competition_type_id' => ['required', 'string', new IsCompositeUnique('basketball_competitions',...
Share:

Monday, 26 June 2023

Laravel Nova ReadOnly Problems

 On Laravel Nova,   when creating record field with readonly and default values are not submitted.  This is the correct way to work around it.Text::make("Field Name", 'field_name') ->withMeta( [ 'extraAttributes' => ['readonly' => true], 'value' => $this->field_name ?? 'Default Value' ]),&nb...
Share:

Popular Posts

Recent Posts

Pages

Powered by Blogger.

About Me

My photo
For the past 10 years, I've been playing with codes using PHP, Java, Rails. I do this for a living and love new things to learn and the challenges that comes with it. Besides programming I love spending time with friends and family and can often be found together catching the latest movie or planning a trip to someplace I've never been before.