Skip to content

Tag: laravel

Laravel Multilayered groupBy

Assume we have this record: While assuming we have this code in our DummyController: And lastly, assuming we have @foreach ($dummyRecord as $dummy_column_name => $dummy) inside our index.blade, we could display the result as such: But I want to display the relation 4’s record of color as a div inside…

how to modify user table

I would like to add two fields to the table user. the first name and a key. on RegisterController On user model table migration I have no errors, but the registration does not go to the database and I stay on the registration page Answer Remove this line ‘cle’ => [‘required’, &#8216…

Laravel Duplicate Route names

I’m using same route name for the get & post methods in route. those routes are using for the same purpose. ex : I’m calling to load add view form using get route Route::get(‘add’, ‘UserController@addView’)->name(‘user.add’); then, I’m calling to st…

How to save data to db using laravel import?

I have prepared code below, and I’m using the dump to trace if it passed to models’ create function. When I checked in the database there is no data added, I’m just wondering why it does not have when it is already passed in User::create function (verified by string “created” bel…