Return to homepage
03/25. One To One: Reverse relationship

Comments

Kenna

Hi. Which GUI are you using for your database management?

  • 0
ahmed khaleel

TablePlus

  • 0
Kenna

Thanks a mill

  • 0
Kenna

Love the phrase "To make life easier on your future self". Cracks me up but very true.

  • 1
Tom

Hi, @Alex is there video with implementing SQL view which you started on video 15 - (Advanced Has Many Through: A quick guide to SQL views 5 complete)? Is it on other course?

  • 3
Chris

Alex, Can you fix the video download for part 5 which is downloading the video for part 6. In addidtion to this, the video downloads for parts 18,19,20,21,22,23,24 and 25 are the correct video but the numbers contained in the file names are showing 19,20,21,22,23,24,25 and 26.

  • 0
jiri

The video about finishing SQL views is missing.

  • 6
Rohan

I have this question if instead of Tag I have Property? What table would I have?

I am making a simple Property listing site, wherein I have Property, Amenity and Rule table

Property have many Amenities and Rules Amenities belongs to many Property and Rules belongs to many Property. What should I do?

'Propertyables'? what would be the name of the table?

  • 0
Alex

Propertyables is a perfectly acceptable name for it, yep!

You'd just need to make sure you specify this when creating the relationship in the code.

  • 0
Senthilkumar

unable to download video no 5, 18,20,22,24

  • 0
Israel

So I'm building an app that uses a one to many relationship. To show a user's project in their account, I used
$projects = $request->user()->projects()->orderBy('created_at', 'desc')->get();

How can I get this to paginate?

  • 0
Fresh

Duplicate download / same video part 5 and 6

Or missing video part 5 when download

  • 3
Ravi

Yes, I am facing the same problem

  • 0
Ravi

Same is the problem is part 18 & 19

  • 0
Nathan

I just watched this and thought that's cool... but how would that work with Vue?

Enter... https://codecourse.com/courses/reusable-laravel-comments

:D

  • 0
CHRIS

Hi :D

I am having an issue regarding the results returned by the primary key I am using - id!! instead of getting results back for say rows where id = 12 - I am get rows back for id = 1.

The same is true for id = 123 or I get a result set back for id = 2 instead of id 231.

The result only seems to match the first digit! Could anyone possibly help? :/

Chris

  • 0
hi

i have a 2 diffrent mysql connection

1 - mysql db

categories table 2 - articles db

article table articles_categories table i try to make a relationship with the two tables with a difrrent mysql conacction

but i get an error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'articles.categories' doesn't exist (SQL: select categories.*, articles_categories.article_id as pivot_article_id, articles_categories.category_id as pivot_category_id from categories inner join articles_categories on categories.id = articles_categories.category_id where articles_categories.article_id = 7) categories db is inside mysql table and article and articles_categories is inside the articles db connaction

this is my code:

public function categories(){

return $this->belongsToMany('App\Models\Category','articles_categories','article_id','category_id'); }

i think the laravel try to find the categories table in articles db but the categories table is inside the mysql db

thanks

  • 0
Tomasz

There is a problem when I'm trying to download file "23: Inserting, updating and deleting", 'Server s3.amazonaws.com sent incorrect response. ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION'. Every other file is ok, this one is not. I can view it in browser but it cannot be downloaded.

  • 0
Murad

download videos not Work !!

  • 0
Germaine

Is anyone able to give insight into the error below? My research seems to indicate that offset may be the problem but this is the syntax generated by Eloquent ORM.

Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'offset 17' at line 1

(SQL: select * from schedules where weekdays like %4% order by eta asc offset 17)

  • 0
Germaine

My mistake was to omit the take() operator from the Eloquent syntax.

static::where('weekdays', 'like', '%' . $weekday . '%') ->skip($count) ->take(7) ->orderBy('eta', 'asc') ->get()

  • 0