Laravel Tutorial Part 2 - Migrations and Artisan

  Рет қаралды 140,118

andrewperk

andrewperk

Күн бұрын

Пікірлер: 71
@Paeblits
@Paeblits 11 жыл бұрын
Great tut man. You explain this so clearly: your voice, comments, etc. Really well done.
@bnewton149
@bnewton149 10 жыл бұрын
I have been programming for a little over a year now and this is my first experience with a framework and this is so cool that I feel high.
@lambertpatrick1841
@lambertpatrick1841 7 жыл бұрын
Ths video helps me alot i was starting using laravel 5.3 i didnt know in order to migrate for previous version 5.0 and below you must migrate:install.I was getting error for over weeks till i saw this video salute bro...
@toorjatoorja2388
@toorjatoorja2388 7 жыл бұрын
You Laravel tutorials are just great ! So smooth. Thank you.
@divyabalachandran9611
@divyabalachandran9611 10 жыл бұрын
Great Tutorial Andrew.....Thanks a lot..
@andrewperk
@andrewperk 11 жыл бұрын
The main benefit of migrations, for me at least, is that it each migration acts like a point in time and you can then easily reset back to that point. It also makes it easy to rollback and completely wipe the database then rerun the migration to create all of the tables again. Migrations also use timestamps so if you work in a team it makes it harder for other programmers to accidentally overwrite what you've done. Another benefit is that you can work with SQL using just one language, PHP.
@1kalekip1
@1kalekip1 10 жыл бұрын
A small note: the minute in PHP is not "m" (which is for the month), but "i". So: date('Y-m-d H:i:s')
@andrewperk
@andrewperk 11 жыл бұрын
It's perfectly fine to use PHPMyAdmin if you prefer. Migrations are just a tool and PHPMyAdmin is another tool. Pick whatever tool makes you most productive and gets the job done right.
@ezekielthemack
@ezekielthemack 12 жыл бұрын
Excellent tutorial Andrew. Thanks very much for your help.
@Nstsandy12
@Nstsandy12 11 жыл бұрын
Great tutorial, I look forward to seeing more..
@andrewperk
@andrewperk 11 жыл бұрын
You'll need to add the path to your php installation to your system environment variables. Just google "add php to environment variables" and you'll find a buch of results. Afterwards, restart your command line and the php command should work. Good luck!
@PrideChung
@PrideChung 12 жыл бұрын
Really great tutorial, easy to understand.,and short
@MyTemaSM
@MyTemaSM 9 жыл бұрын
Thanks for your tutors! You have small typo, when inserting data to 'authors' table: date("Y-m-d H:m:s") so you mistaken with minutes, it must be: date("Y-m-d H:i:s")
@lakshmananr8890
@lakshmananr8890 9 жыл бұрын
Very Nice tutorial easily understand and developed ...
@testvetegromedia
@testvetegromedia 12 жыл бұрын
great vid! but it would be a good thing if you could work on the sound quality. Purchase a better headset and put the pc under the desk to kill these sonor noises in the back. I think that would help a lot. But again, the video's great and i'll watch all videos of this series. Thx for that!
@museumoftechno
@museumoftechno 11 жыл бұрын
Hi there If you had 2 authors with the same name - one added via a migration "up" method, one maybe added by someone else by another process, and you ran a migration's "down" method which deleted matching on name, I guess that would delete both authors with the same name? Is that an issue worth worrying about, and if so are there best practices to mitigate the issue? Thanks for the top-quality tutorials!
@Chellles
@Chellles 10 жыл бұрын
Thanks for your video, this is very useful for me and the comunity.
@CalicoArchives
@CalicoArchives 8 жыл бұрын
Nice tutorial. When you already have a lot of information in a table that was user generated, how do you generate a migration file similar to Add_Authors so you can move everything to a new table in another database?
@devthapa609
@devthapa609 10 жыл бұрын
very Good Tutorial to understand Laravel. Thanks
@bobbarker3387
@bobbarker3387 10 жыл бұрын
Nice demonstration of the migration function. Not sure why you demonstrated hard coding the table updates though. Certainly not a best practice and certainly something that would never be done in production.
@k4f
@k4f 11 жыл бұрын
That makes perfect sense, similar to how Rails does it. However, if I am the only developer on the project and don't want to worry about rollbacks, etc. (small project) is it okay to simply create the tables myself through phpMyAdmin? Or is there a downside to that other than what you mentioned?
@triple111111
@triple111111 11 жыл бұрын
nice work, i like your tutorials
@GrumpyDeveloper
@GrumpyDeveloper 12 жыл бұрын
Nice tutorial. I would be better to add your data fixtures for the insert authors as a task and keep migrations for schema operations
@carlk7109
@carlk7109 11 жыл бұрын
Hey Andrew. As a laravel newb, I just wanted to thank you for the tutorials. One question that I have in this one: it looks like you're doing the initial seeding of the authors table within the migrations directory, rather than using the seeds directory as others suggest. For me, I'd prefer keeping everything in the one directory, as you do here; is there any downside with doing things this way?
@justinwong1436
@justinwong1436 9 жыл бұрын
Thank you so much!! Yr video is so informative and pretty helpful to me :D
@marcelloperri183
@marcelloperri183 10 жыл бұрын
thanks mate, you are very good teacher, but I don't understand the purpose of a programming style like that. We should create something more dynamic and flexible... I hope to understand in the next video.
@andrewperk
@andrewperk 12 жыл бұрын
You're right. I noticed that right after I uploaded the video but it was too late at that point. Thanks though.
@AnGhaeilge
@AnGhaeilge 9 жыл бұрын
When attempting to create the create table script, I get this error: "Command "migrate:make" is not defined." - Apparently, the updated command is "php artisan make:migration [name]"
@webtjanst6720
@webtjanst6720 7 жыл бұрын
Is there any video that shows how to install Sctipt based on Laravel and Bootstrap in webhosting?
@RedGlobeMedia
@RedGlobeMedia 11 жыл бұрын
Did you create the database first (it won't create it for you) and configure the connection in laravel/app/config/database.php?
@vipinsankhlecha2
@vipinsankhlecha2 10 жыл бұрын
I am getting error on php artisan migrate:install- SQLSTATE[HY000] [1049] Unknown database
@farhantubeify
@farhantubeify 11 жыл бұрын
did you fixed it, I'm new to laravel and also facing same problem.
@jomarmillete3697
@jomarmillete3697 7 жыл бұрын
is there's a difference when ill just use and manage the data directly in phpmyadmin? cause it is much easier rather than manually typing the data and commands
@lazaraleksic4742
@lazaraleksic4742 7 жыл бұрын
I am following with video , doing everything as u do, but in phpmyadmin section where my autors are i cant see Andew Perkins and Author numbler 2 . It doenst show
@visheshdwivedi6970
@visheshdwivedi6970 7 жыл бұрын
if i manipulate my table using xampp server.. not by migrations ... then will it affect later in the process..while my making my website??
@vipinsankhlecha2
@vipinsankhlecha2 10 жыл бұрын
When I created two add migration file and do migrate:rollback both are rollback simultaneously but require only specified file is rollback.Please tell me how can i do........?
@deepakgoswami0143
@deepakgoswami0143 5 жыл бұрын
Nice work.. (y). sir, can you please give the name of your Sublime Editor Theme and color scheme settings detail .. I liked that :)
@coreydoyle4702
@coreydoyle4702 11 жыл бұрын
What is the benefit of creating a database table through the migration method? -Cheers
12 жыл бұрын
Hi andrew what's your font settings in sublime text ?
@c101hir
@c101hir 10 жыл бұрын
Thanks Man, it's Awesome ...
@mailshijith
@mailshijith 8 жыл бұрын
Can i use this migration from existing table ?
@DaveStewartLondon
@DaveStewartLondon 11 жыл бұрын
Any reason you didn't just insert the SQL natively inside the up function?
@nacoxify
@nacoxify 10 жыл бұрын
you don't need to insert created_at and updated_at manually since timestamps-method does it for you
@lakshmananr8890
@lakshmananr8890 9 жыл бұрын
My question Wamp Only used or else Xamp can i used???
@thecodes
@thecodes 7 жыл бұрын
HY, I HAVE A LARAVEL PROJECT IN 4.2, NOW I NEED TO UPGRATE IT INTO 5.5, HOW TO DO THIS?
@ElijahAlcantara
@ElijahAlcantara 10 жыл бұрын
Does anyone know why in Laravel4 we are getting "Nothing to migrate" with the code?
@matteusdev23
@matteusdev23 10 жыл бұрын
Because you've done the migration one time already. execute php artisan migrate:make yourtablename again, and place your code in the up() function right there. Thats the way i do it with no problems. Have you discovered a way to do it?
@LizardanNet
@LizardanNet 10 жыл бұрын
unknown column errror, "created at" column not found
@brian4it
@brian4it 10 жыл бұрын
I love you, man. :)
@nit11a01
@nit11a01 11 жыл бұрын
why i am getting error in command prompting. MY OS is WIN7 32bit Prof
@TechBroad
@TechBroad 10 жыл бұрын
why do you dont need to put the: use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; ??????????????
@bikramshrestha9380
@bikramshrestha9380 6 жыл бұрын
Thank you!
@alexwly7
@alexwly7 11 жыл бұрын
I have this problem -Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)- when I execute in the terminal this "php artisan migrate:install" for those who have problems intalling migrate using mamp.. add this 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock', in database.php on mysql array configuration right after 'host' => 'localhost', if u want and that should solve the problem..
@FeliceOstuni
@FeliceOstuni 12 жыл бұрын
jut to say, great video, but correct iso timestamp is: date('Y-m-d H:i:s') not date('Y-m-d H:m:s');
@kavyakhachane7528
@kavyakhachane7528 10 жыл бұрын
u r great!!
@rababzein7012
@rababzein7012 9 жыл бұрын
Is that Laravel 4 or Larvel 5 ??
@Joe0994
@Joe0994 9 жыл бұрын
+Rabab Zein 4
@bangje8498
@bangje8498 11 жыл бұрын
is this laravel 4 or 3?
@jaycole9119
@jaycole9119 11 жыл бұрын
certainly not 4
@coreydoyle4702
@coreydoyle4702 11 жыл бұрын
I see, thank you. -Cheers
@coreydoyle4702
@coreydoyle4702 11 жыл бұрын
Why was this marked as spam???
@triple111111
@triple111111 11 жыл бұрын
same opinion
@acrolyt
@acrolyt 12 жыл бұрын
H:i:s, dude : ) Still, very nice tutorial, thanks and keep up the good work.
@nit11a01
@nit11a01 11 жыл бұрын
i cant user artisan
@ummarah-baba
@ummarah-baba 11 жыл бұрын
SQLSTATE[HY000] [1049] Unknown database 'database'
@cefbmail
@cefbmail 11 жыл бұрын
i saw that 2 haha
@paulwesley9364
@paulwesley9364 9 жыл бұрын
so so
@MrLarsjansen
@MrLarsjansen 8 жыл бұрын
Y-m-d H:i:s ;)
@HoangPhan997
@HoangPhan997 8 жыл бұрын
sir, i'd ask which version of lavarel which you use in above demonstration.. I am a completely newbie, I have just worked with laveral a few days ago, and I am so confused because there many tutorials but ... there are many version and each one of them is different
@vipinsankhlecha2
@vipinsankhlecha2 10 жыл бұрын
I am getting error on php artisan migrate:install- SQLSTATE[HY000] [1049] Unknown database 'laravel'
@joshuawedekind3903
@joshuawedekind3903 10 жыл бұрын
Have you created a database named "laravel" on your local MySQL server?
Laravel Tutorial Part 5 - CRUD - Retrieving Data with Eloquent
17:41
Which team will win? Team Joy or Team Gumball?! 🤔
00:29
BigSchool
Рет қаралды 15 МЛН
这是自救的好办法 #路飞#海贼王
00:43
路飞与唐舞桐
Рет қаралды 128 МЛН
Laravel Tutorial Part 1 - Installation and Configuration
8:28
andrewperk
Рет қаралды 302 М.
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 87 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 246 М.
Pro Workflow in Laravel And Sublime Text
4:39
Tuts+ Code
Рет қаралды 60 М.
Laravel Tutorial Part 4 - Views, Blade, and Layouts
11:50
andrewperk
Рет қаралды 88 М.