Update Query in Laravel using Eloquent ORM | Explained in Hindi | Laravel 8 Tutorial #17

  Рет қаралды 45,348

WsCube Tech

WsCube Tech

Күн бұрын

Пікірлер: 89
@wscubetech
@wscubetech 2 жыл бұрын
😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments. 🔴 To learn Web Development online with regular LIVE CLASSES, enroll now: forms.gle/XVJRMQdCMoPeNpBm7 👉For professional self-paced certification courses (pre-recorded), visit: bit.ly/Pre-Recorded-Course 👉Don’t forget to SUBSCRIBE to our channel for more such videos & valuable content: bit.ly/KZbin-WsCubeTech
@smohanty3555
@smohanty3555 2 жыл бұрын
Solution: public function create() { $url = url('customer'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer')->with($data); }
@professional4634
@professional4634 Жыл бұрын
Thank you so much bro
@Saikat.Golder
@Saikat.Golder Жыл бұрын
thank you dear... It is working .. Thanks a lot...
@LogicLab_LRK
@LogicLab_LRK Жыл бұрын
but it still is creating new record update function isn't working
@rahulbaghel1680
@rahulbaghel1680 Жыл бұрын
thanks it works
@horrorkinghindi1179
@horrorkinghindi1179 3 ай бұрын
thanx bhai. saved my time
@JaypalDhoriya-f9u
@JaypalDhoriya-f9u 6 ай бұрын
Hey, Thanks for Update Query Video! In this Video Update Query Successfully Called but into Laravel 11when Add New Customer then it's generate error inside all input filled into Register Form: ( Undefined variable $customer )
@mdsayfulislam1022
@mdsayfulislam1022 2 жыл бұрын
After set value I can't go to add customer page. It says, Undefined variable $customer
@user-og1qm9ql7j
@user-og1qm9ql7j 2 жыл бұрын
Haan bhai, because there is no $customer variable passed to the registration page. To solve this issue, use this instead of using value="{{$customer->name}}" for each input tag, value="{{ isset($customer) ? $customer->name : '' }}"
@utsavshah9937
@utsavshah9937 2 жыл бұрын
@@user-og1qm9ql7j thank you , but drop down list me kya condition aayegi
@AbdulAjijAnsari-m7i
@AbdulAjijAnsari-m7i Жыл бұрын
@@utsavshah9937 update your method for open form for registration - $url = url('customer'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer')->with($data);
@VanditPatel-dl2mn
@VanditPatel-dl2mn 11 ай бұрын
right
@thakchandthombre3461
@thakchandthombre3461 3 жыл бұрын
$customer undefined error is resolved, just by defining & passing $customer variable as follows : $url = url('customer/store'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer.create')->with($data);
@ExploreWithTalhaaa
@ExploreWithTalhaaa 2 жыл бұрын
Thank you its working for me
@Rohangaokar
@Rohangaokar 2 жыл бұрын
Thank you so much :)
@aaminakhan6105
@aaminakhan6105 2 жыл бұрын
@Thakchand Thombre Thank you so much
@m.rashidali3149
@m.rashidali3149 2 жыл бұрын
Thank you sir 😘😘
@AhmedAliArtech
@AhmedAliArtech Жыл бұрын
👍
@makeauthority
@makeauthority 3 жыл бұрын
Sir, when we click on add customer is ask me $customer is undefined. how to resolve. I suppose to be @isset($customer) then form declare and when not set only simple form will declare. please reply.
@thakchandthombre3461
@thakchandthombre3461 3 жыл бұрын
$customer undefined error is resolved, just by defining & passing $customer variable as follows : $url = url('customer/store'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer.create')->with($data);
@SoniYadav-nk8mg
@SoniYadav-nk8mg 2 жыл бұрын
Create Custom page give an error $customer variable is not defined
@VanditPatel-dl2mn
@VanditPatel-dl2mn 11 ай бұрын
ha mere me bhi same error
@yahyashaikh3657
@yahyashaikh3657 Жыл бұрын
sir is video me update page ke liye aapne value = " {{$customer->name}}" dale hai but jab yeh add cusmer ka page me open hoga to $ customer not find araha hai
@jayeshparmar3132
@jayeshparmar3132 Жыл бұрын
$customer=new Customer(); use this
@anumalavenkatesh1205
@anumalavenkatesh1205 Жыл бұрын
It's working, thank you.
@karishmasharma5571
@karishmasharma5571 2 жыл бұрын
button ke click pr update function kaise call ho rha hai ??
@biplabsarkar2050
@biplabsarkar2050 10 ай бұрын
Whenever i update, there is an error " Undefined variable $customer" But database is updated ... What should i do,, please help me...🙏
@krishnadawalkar6999
@krishnadawalkar6999 8 ай бұрын
yeah I also faced the same error... like for the very first time when we create the customer data at that time we get this undefined customer error because for the first time the customer object is not defined... once we update then there is some data in customer
@krishnadawalkar6999
@krishnadawalkar6999 8 ай бұрын
$title = "Customer Registaration"; $customer = new Customers(); $url = url('customer'); $data = compact('url', 'title', 'customer');
@GopalKumar-nt7zt
@GopalKumar-nt7zt Жыл бұрын
sir update k time humne input ki value property change kar diye, pichle video me aapne old() k through data set karna batay they, ab usko kaise set karenge?
@salonigupta3865
@salonigupta3865 Жыл бұрын
I'm also having same question
@salonigupta3865
@salonigupta3865 Жыл бұрын
value="{{isset($cust) ? $cust->city : old('city')}}"
@HamzaIsmail-h3n
@HamzaIsmail-h3n Жыл бұрын
I need this template that is using in this video
@ayazaamur
@ayazaamur Жыл бұрын
Sir you use same page for create customer and update customer. I update customer it work perfect but when i add new customer then it generate errors of unfriend variable that variables that you use in input tags for update customer So what i do sir?????
@CoderMankirat-dp7ln
@CoderMankirat-dp7ln Жыл бұрын
value="{{isset($customer)?$customer->first_name :''}}"
@mrsingh6895
@mrsingh6895 Жыл бұрын
hello sir, how can we inline update data in table without using model in Laravel 8. Just click on edit button and all field convert into input field and edit button replace with update button and update the data.
@kamalthapa2924
@kamalthapa2924 2 жыл бұрын
how to pass the value using the component in the php
@adnanCreativeHub
@adnanCreativeHub Жыл бұрын
already explained in components video
@krishnamohanmandal1676
@krishnamohanmandal1676 3 жыл бұрын
Sir when I click on customer/create Is showing error: $customer undefined Please help
@makeauthority
@makeauthority 3 жыл бұрын
I solve it, if you need help WhatsApp me from #lingarajtechhub contact number.
@akashprashar3615
@akashprashar3615 3 жыл бұрын
Do you solve this issue
@makeauthority
@makeauthority 3 жыл бұрын
@@akashprashar3615 yes
@wrldinfu
@wrldinfu 3 жыл бұрын
Please help me fix the same issue
@thakchandthombre3461
@thakchandthombre3461 3 жыл бұрын
$customer undefined error is resolved, just by defining & passing $customer variable as follows : $url = url('customer/store'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer.create')->with($data);
@NIKHILSCI-t3g
@NIKHILSCI-t3g Жыл бұрын
how to redirect After update some info, return to current paginated page laravel 10 ?
@digitalinfo5253
@digitalinfo5253 Жыл бұрын
return redirect('pagename')
@AbdulAjijAnsari-m7i
@AbdulAjijAnsari-m7i Жыл бұрын
What will happen if you again go for adding a new customer? I think we will get an error because $customer is not recognised now. We have $customer only when coming for update, but we do not have when coming for registration.
@farhanmehsood
@farhanmehsood Жыл бұрын
value="{{isset($customer)? $customer->country: ''}}" make a condition on input value field like this i think its resolve your issue
@shubhamvishwakarma934
@shubhamvishwakarma934 Жыл бұрын
Solution: inside CustomerController define variable public function create() { $url = url('customer'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer')->with($data); }
@himanshuranjan5203
@himanshuranjan5203 Жыл бұрын
@@farhanmehsood love u bro
@himanshuranjan5203
@himanshuranjan5203 Жыл бұрын
@@shubhamvishwakarma934 thanks bhai
@farhanmehsood
@farhanmehsood Жыл бұрын
@@himanshuranjan5203 Pleasure bro
@moeezahmad1371
@moeezahmad1371 Жыл бұрын
those who are getting are of undefined variable: For normal input fields: And for select fields customer_gender) {{ $customer>customer_gender == 'M' ? 'selected' : '' }} @endisset >M customer_gender) {{ $customer->customer_gender == 'F' ? 'selected' : ''}} @endisset >F customer_gender) {{ $customer->customer_gender == 'O' ? 'selected' : '' }} @endisset >O for radio replace "selected" with "checked"
@saqibkhan9009
@saqibkhan9009 Жыл бұрын
Sir there is undefined variable error arrives in customer/create page after passing value="{{$customer->name}}"
@MadhusudhanMejari
@MadhusudhanMejari Жыл бұрын
value="{{$customer->name ?? ' '}}" use like this every input feild it will reslove
@saqibkhan9009
@saqibkhan9009 Жыл бұрын
@@MadhusudhanMejari Thanks
@ayazaamur
@ayazaamur Жыл бұрын
@@MadhusudhanMejari thanks brother i am also facing this problem
@muneebrehman9685
@muneebrehman9685 3 жыл бұрын
I am having the same issue?
@thakchandthombre3461
@thakchandthombre3461 3 жыл бұрын
$customer undefined error is resolved, just by defining & passing $customer variable as follows : $url = url('customer/store'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer.create')->with($data);
@princesukhala7106
@princesukhala7106 Жыл бұрын
7:00 Done
@4hm3df4r42
@4hm3df4r42 3 жыл бұрын
Thanks for the video.
@chirangivkumawat2298
@chirangivkumawat2298 3 жыл бұрын
Good morning
@sukhenhalder4u
@sukhenhalder4u Жыл бұрын
Very Fast😢
@ilovemyindia7959
@ilovemyindia7959 2 жыл бұрын
Contect form a not a work
@afzaalahmad3282
@afzaalahmad3282 3 жыл бұрын
#wscubetech bro playlist bnany k baad kindly students k issue b resolve kr dein
@akashprashar3615
@akashprashar3615 3 жыл бұрын
I also face the same issue
@thakchandthombre3461
@thakchandthombre3461 3 жыл бұрын
$customer undefined error is resolved, just by defining & passing $customer variable as follows : $url = url('customer/store'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer.create')->with($data);
@nomansanaullah3075
@nomansanaullah3075 2 жыл бұрын
Write $customer= new Customers(); and also pass in compact And it will solve problem
@yousufhasnain9976
@yousufhasnain9976 Жыл бұрын
active inactive
@afzaalahmad3282
@afzaalahmad3282 3 жыл бұрын
did anyone find solution to this issue, if we use issset function on whole form then form dynamic bnany wala maqsad khatam hogya , q k isset waly function mein b sary form ki coding aani , or !isset waly mein b sari coding aani
@4hm3df4r42
@4hm3df4r42 3 жыл бұрын
Explain me. I'll try to help.
@mindgrowingteach5634
@mindgrowingteach5634 3 жыл бұрын
Sir or videos banaya firstly
@AhmedAliArtech
@AhmedAliArtech Жыл бұрын
After putting dynamic values in name email fields, It is unable to re visit the customer.blade without error can somebody help...
@AbdulAjijAnsari-m7i
@AbdulAjijAnsari-m7i Жыл бұрын
yes see above first comment. You have to add a line in open form method as well. $customer = new Customer(); Now your function will looks like below - $url = url('customer'); $customer=new Customer(); $title='Customer Registration'; $data=compact('url','title','customer'); return view('customer')->with($data);
@CoderMankirat-dp7ln
@CoderMankirat-dp7ln Жыл бұрын
value="{{isset($customer)?$customer->first_name :''}}" {{isset($customer) && $customer->gender=='m'?"checked":""}} Status $customer=Customer::find($id); if( $customer->status=='0'){ $customer->status=1; }else{ $customer->status=0; } $customer->save(); return redirect('view');
@examsolution4928
@examsolution4928 Жыл бұрын
Too fast
@wrldinfu
@wrldinfu 3 жыл бұрын
I am also face the same issue
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Project Roasting with Founders - Coders ka Latent Show 🔥
Piyush Garg
Рет қаралды 1,3 М.
7 Free Software That Are Actually Great! (2025 Update)
9:57
Brett In Tech
Рет қаралды 38 М.
MS Excel-Conditional Formatting-03
5:17
Haque Academy
Рет қаралды 359