laracasts / URL-Shortener

For demo at Laracasts.com
http://laracasts-url.eu1.frbit.net/
84 stars 55 forks source link

Link model is in app\Way #1

Closed tonydew closed 10 years ago

tonydew commented 10 years ago

In https://laracasts.com/lessons/build-a-url-shortener-part-2 the Link model is shown in app/models but it is in app/Way here in the repo.

It doesn't seem to affect the app as is, but if you try and say, make a DB seeder, you get the following error:

PHP Fatal error: Class 'Link' not found in /vagrant/app/database/seeds/LinksTableSeeder.php on line 10

I added an alias in app.php and it works now, but I have no idea if that is the correct way to go about things or not.

CristianGiordano commented 10 years ago

Hi @tonydew,

At the top of your database seeder you need to import the Link model by use'ing it

A example seeder: http://paste.jesse-obrien.ca/on

tonydew commented 10 years ago

Thank you. I got it working, but the what the screencast shows and what the repo contains are different. Didn't know if there was something I missed or not.