Это видео недоступно.
Сожалеем об этом.
Laravel 8 tutorial in Hindi - Delete Data in Database
HTML-код
- Опубликовано: 17 сен 2020
- In this laravel 8 video tutorial, we learn how to delete data and record in database pagination in a simple way. This video is made by anil Sidhu in the Hindi language.
steps of video
Make HTML form in view
Make Model
Make Controller
Make routes
delete record in DB
check record is deleted on not
Interview Question over Model
Laravel 9 tutorial in hindi
laravel 9
Please support me by subscribe, like and comment :) thank you
Sir! Ager main Database main column name id ki jaga py koie or name (ID,Id,Pid) krta to record delete ni hota..plz Kuch btae ga...k only column k name id rehkny py he delete hota hai ..or ager koie or name rekhy to delete ni hota
So the answer to 1st question is = to write this code after deleting query like
if($data)
{ return redirect('client')-with('success', 'Record Deleted');}
else
{ return redirect('client')-with('fail', 'Record Not Deleted');}
in index file to write before table
@if(Session::get('success'))
{{Session::get('success')}}
@endif
@if(Session::get('fail'))
{{Session::get('fail')}}
@endif
The answer to the 2nd question is = We can delete multiple records using ajax
thank you brother
Can you please answer the every interview question. Thanks for your effort
Is this concept of $data = Member::find($id); is not supported in laravel 9?? because this is not working but this is working Member::where('members_id', '=', $id)->delete();
Please reply
To display flash message on data deletion, 1. firstly we need to define (Request $req) parameter in delete function as function delete(Request $req,$id) and now we'll add this line in controller in delete function : $req->session()->flash('success', 'Records deleted Successfully'); 2. In view, we will write: @if(Session::get('success'))
{{Session::get('success')}}
@endif
@if(Session::get('fail'))
{{Session::get('fail')}}
@endif
thanks sir
nice
Can you please answer the every interview question. Thanks for your effort
Please tell me how can I find your answers of interview questions
under the comment section of every video
You Had Make MemberController in Previous Video Also. Just Reuse that one.
Call to a member function delete() on null i am facing that error i checked everything but can not find any thing
Sir! Ager main Database main column name id ki jaga py koie or name (ID,Id,Pid) krta to record delete ni hota..plz Kuch btae ga...k only column k name id rehkny py he delete hota hai ..or ager koie or name rekhy to delete ni hota
Asslam o alikum! Usman bhai koi solution mila hy to kindly muje bhi bta dain. Thank you.
@@sufiyan101 bro age id name kay elava koi ur naam rkho gy tou wohi name href tag main b dena pryga...you can simply delete data with name as well
Sir
$data = Member::all();
Ki jagah
$data = Member::get();
Function use krskte he?
krke dekh le bhai. 😀😀
@@mohammedimran1144 bhai sb krke dekh chuka hu sh me data aata h
Session::flash use krke ham meseg dikha skte he record deleted successfully
exactily bro👍
@@mohammedimran1144 hum ise delete wali video mei kyse display krwaien gye
@@aatikaati1038 😀😀😀apni phuddi say
When I hit Delete button I have shown error like.. Failed to load resources : the server responded with a status of 404 (not found) even although I have analysed own code again and again code not have any error fetch data successfully but can't deleted
chal nhi raha ha mere code ya wala sir
$data= Member::where('id',$id)->delete();
@@coderram8023 Yah i used that already and now my code is working but what fthat find method method is not working can you tell me?