Laravel 8 tutorial - Save Data in Database
Vložit
- čas přidán 16. 09. 2020
- In this laravel 8 and 9 video tutorial, we learn how to save data in database pagination in a simple way. This video is made by anil Sidhu in the English language.
steps of video
Make HTML form in view
Make Model
Make Controller
Make routes
save data in db
check and is saved on not
Interview Question over Model
Latest laravel tutorial with version 9
laravel 9 tutorial
laravel 9 playlist • Laravel 9 tutorial
Please support me by subscribe, like and comment :) thank you
no u are a scammer
I'm from Vietnam, I thank you so much for these useful videos
the best instructor the best tutorial Thanks a lot .love u❤
i have repeated this video for 5 times for practice and to sharpen skill on laravel, If you come to Kathmandu to visit Pashupatinath, I will host you. God bless you brother.
Thnx dear
We can save data into two tables with the help of one model by using eloquent relationships.
How Can you Please shear the method?
U saved my life bro..
thank you sooo much, worked for me :)
You saved me. Thanks
Thanks chief, this saved me a lot of stress!
That's really cool, man! Helped me out a ton, thanks!!
thanks bro, you're the best
while i m import model after write code of controller...it is just loading and loading nothing gonna happen, no error no output.. what i have to do....i m using laravel 8
Thank you, this helped alot!
thanks a lot ❤️ 🔥🔥
THANK YOU :)
Thank you....
The best tutorial in the world :) Thanks
Well done
we can create two functions to save data in two tables
Hello, In CI We write all kind database related code in model. But In Laraval we just create model and define table names only write all code in my controller.... So, Please explain me what kind of functions that we write in my model. and create a simple project with all existing files....
actually we should not use One model for two or more tables, each model is specified for that particular table, its unnecessary thing. each table has and should have its own Model.
Oh...But what if we need to use joins on the table where there is an interaction of 2 or more tables?
^ What Ultimate-ACs said. or idk. im a newbie prorammer, is it necessary to make them in the same file to join the table?
Thanks a lot
bro..after putting values in the input fields...the submitt button is not going on any page (means to say submiit button is not working not submitting values the what is the error occur ....) please guide
bro change submit button change button to
sir what if we have non required
input field. it give us error how to solve it ?
can add default value in the input field in mySql database, should solve the issue. (localhost/phpmyadmin -> your database table -> structure -> edit the field -> default value-> NULL)
How would you authentiate this table on login
how can add data using foriegn key ?
hey but i am not able to run $ member->save(); it is giving me error....
array_key_exists(): The first argument should be either a string or an integer...
it giving me this error .... i hope u solve this
you have to specify your first argument in the database table when you created it.
hello, I just can't seem to insert data into my database, can you please tell me why? I'm using laravel 8
any error u have?
@@haroonbadshah4635 no error sir but it not stored in database
sir ye error aa rha hai "message": "Method App\\Http\\Controllers\\TeacherController::save does not exist.",
// Model:-
I am getting and error---> Trait 'App\HasFactory' not found what to do now and in Eloquent folder i have only factory.php not factories? how to solve it , i am using laravel 8 . I followed every step still not able to insert data. plzz help
Add use HasFactory; in the model under the member class
Btw did your project was installed properly with no errors?
@@abhinavsingh7859 yes abhinav my project was installed properly..do you think there is an issue in the installation?
Yes i think....if you are following every steps properly then may be there might be a issue that you didn't set it up properly....it happens to me most of the time...did you added that one line in the model....?
@@abhinavsingh7859 yes I did added the model and followed every step...but i tried another way and was able to insert data into my db.. anyway thanks lot for the help.🌻
sub video hindi mai banaye ye kyu english mai ?
bhai bs ab bta do donation kaha karna hai??????????????????????????????
Title apney Hindi diya howa he or parha English me rhy ho ap
thats not fair.
its giving me null response
Did you solve the issue
Save data with migration
using hasmany relationship we can insert into mutliple tables
Haaaiii
Why are you making your own methods? It should use the create, store, edit, update methods...
jab sare video hindi translate kiye to ye video to english me krne ka
After entering data page is expired
Add @csrf just above your input field in the form
run : php artisan optimize
Can you do in the model:
$member = new Member;
$member = $req;
Instead of saving all the values one by one?
Thanks
yrrr ye kya chawal mari he apney... shuru waley topics hindi me or main topiucs english me..axhi bhali samjh arhi thi ab me kesay carry on kru ye
course apka
1-2 video me issue hoga brother, i check krta hu
@@codestepbystep ok
Hello man , just have one question , does it mean that every table must have 1 model file ? for example
table1
table2
table3
should i create three models ?
so that i can put on every file
public $table = "table1";
public $table = "table2";
public $table = "table3";
Thank you my friend.