All Questions
5
questions
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
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]
],
$...
1
vote
0
answers
456
views
Laravel encrypt cannot encrypt to database when using Update method
Hi i want to encrypt some field in database when user create or edit data. IF create, the encryption work, but when user edit data, the value that save in database will be normal text not encrypted
&...
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": "...
-1
votes
1
answer
210
views
Laravel: (Session?) Pass value from admin side to user
I have a value called 'goal' in admin.blade page that can be changed by the admin who is logged in. I want to be able to pass that new value on a user's page(user.blade). (There is no registered user, ...