Skip to main content

All Questions

Tagged with
87 votes
3 answers
160k views

Laravel: Listen for Model save or update (after or before they're done)

I need to generate a function to call after or before save() or update() but i don't know how to do. I think I need a callback from save() update() but I don't know how to do. Thanks
Daniele Longheu's user avatar
49 votes
5 answers
39k views

Laravel check if updateOrCreate performed an update

I have the following code in my controller: for($i=0; $i<$number_of_tourists; $i++) { $tourist = Tourist::updateOrCreate([ 'doc_number' => $request['doc_number'][$I] ], $...
Sergej Fomin's user avatar
  • 1,972
5 votes
2 answers
9k views

INVALID CREDENTIALS error when trying to update Laravel/Nova via Composer to latest release

I have been trying for two days now to update Nova After getting the composer.json file correct to where the update process seems to be functioning, correctly I get an authentication error. ...
xarga's user avatar
  • 53
2 votes
3 answers
2k views

Composer Update - Could not load package shopware/shopware in http://packagist.org:

When i do composer update on my Laravel 5.1 it come out with this error > Downloading http://packagist.org/p/symfony/polyfill-mbstring$...
En Diwang's user avatar
2 votes
4 answers
2k views

Cannot update Laravel 5.4 to 5.5 composer

When I tried to update Laravel 5.5 from 5.4, it is show errors. { "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "...
user avatar
2 votes
4 answers
4k views

Laravel 4: php artisan down not defined

I've updated my Laravel installation with the following commands today (which is a few days after Laravel 4's release date): php composer self-update php composer update You can have a look at my ...
Martin's user avatar
  • 741
2 votes
1 answer
112 views

Change variable inside a session Laravel 7

i want to change the attribute "cantidad" inside my session('cart') through a post form which have a input type="num" that will have the quantity to change on the session. But i ...
Gustavo Adrian Galvan's user avatar
2 votes
1 answer
4k views

Update data in database with laravel

Just want to check if it is possible to edit/update a data when my database is save the data like this: I want to update the school_name, start_date, end_date, qualification_list all those but I don'...
Dkna's user avatar
  • 427
2 votes
1 answer
1k views

How to update my Pivot Table with addition field in laravel

My table with eloquent relationship in laravel 5.3 User --id --name Gallery --id --name Video --id --name Tags *pivot ...
Al-Amin's user avatar
  • 778
2 votes
1 answer
2k views

How to use mutators in laravel mass update?

I am currently updating multiple rows in my database by doing the following: I take an array in a post and loop through it, each member is an array of fieldname=>value and I am doing an update on ...
arrowill12's user avatar
  • 1,804
2 votes
1 answer
69 views

How can I show the old value in option fields in Laravel?

I want to show the old select value in this select field when I want to edit. How can I show my old value in these fields? https://github.com/shakibzaman/book-library-laravel you can show my GitHub ...
Shakib Zaman's user avatar
1 vote
2 answers
3k views

Difference between update and editing in controller - laravel

My table has the option edit. A row can be updated and saved to the database. While I was trying to implement this option I came across uncertainty. What do I have to do with the data from my edited ...
Nemo's user avatar
  • 513
1 vote
1 answer
425 views

Laravel Update - Crashes Unless I add RememberToken code to every model

I just have a question about add the three "RememberToken" public functions (getRememberToken(), setRememberToken(), and getRememberTokenName() ). For some reason if I tried to log in and create a new ...
mario's user avatar
  • 1,533
1 vote
1 answer
974 views

Laravel7, user's phone (unique) by update throw 'The phone has already been taken.'

In profile.blade, while updating the inputs in the profile getting Error The phone has already been taken. Controller: public function profileUpdate(Request $request) { $user = Auth::user(); $...
Yassin's user avatar
  • 27
1 vote
2 answers
439 views

Laravel WhereIn() function is not array result when combine with update function

I'm so confused in here, when I wanna make my data to updating to new data the result is always to be one data and the result is not array, like this : when the query is not combine with update method ...
ProLuck's user avatar
  • 369

15 30 50 per page