Support the ongoing development of Laravel.io →

4,311 Threads

How to call a function in response to a deletion of a record by a foreign key constraint?

I have defined a Model class named Support, which abstracts the "supports" table of my DB....

0 Likes
0 Replies

Is there any laravel application using closure-table package?

I am interested in how to create that closure-table model?

0 Likes
0 Replies

Pivot Model with Polymorphic Relationship to another Pivot Model

Here's an overview of my schema. Pardon the rotation. I'm trying to establish a Polymorphic Relatio...

0 Likes
1 Replies
Solved

What is [PDOException] ?

I create a model and a migration in Laravel 4 and add some variables in the migrations and in the mo...

0 Likes
1 Replies
Solved

Which packages has used Baum package

Or any package has used closure table package?

0 Likes
0 Replies

Eloquent model with multiple 1-to-many relationships to the same table

I've just asked this over on StackOverflow http://stackoverflow.com/q/24490324/15531 but I might get...

0 Likes
1 Replies

Bug with sync()?

Hi! I have a form where you edit data, submit to save it, and then return to the same edit view agai...

0 Likes
3 Replies

Comments for multiple models

Hello, I know this question is a little bit vague, but I need to implement the ability to add commen...

0 Likes
2 Replies

DB design & Eloquent: two models related to one category

Hi guys! I'm building a website for a client where there is a catalogue/e-commerce section and I've...

0 Likes
0 Replies

Two way friendship

I have created model so that users can be friends. I have table user_friends where user_id and frien...

0 Likes
0 Replies

unittest migrate vendor package with SQLite

Hi, I'm using the Sentry package how can manage this setup public function setUpDb() { A...

0 Likes
1 Replies

Raw statement in Laravel's Eloquent whereIn method

I would simply like to run such query: select * from `users` where SUBSTRING_INDEX(`email`, '@' ,-1)...

0 Likes
0 Replies

Laravel belongsTo not working

I have 2 models in my app, 'User' & 'MedicineType' (each User belongs to one MedicineType). I ma...

0 Likes
2 Replies
Solved

Laravel/Eloquent many-to-many query with a logical "and"

I have a many-to-many relationship between my "resources" and "category" tables,...

0 Likes
0 Replies

I need to make following system between members of the site such as Twitter

I need help in the make of the Relationships between him and User model

0 Likes
4 Replies
Solved

Creating admin page

I have 2 models, Posts and Users. What's the best way to display all the posts and users from databa...

0 Likes
4 Replies

Misunderstanding of belongsToMany relationship

Hello! I'm trying to save part of a form data to a pivot table. This works fine while saving, but I'...

0 Likes
0 Replies

My GET input isn't logging to DB

Trying to create a simple input method. My DB table (comments) contains an increment "id",...

0 Likes
2 Replies
Solved

Query producing wrong SQL

I have : $data = Page::find($page_id); return View::make('pages.slider', array( 'page' => $data,...

0 Likes
3 Replies

Polymorphic Relationship on a Pivot Table (but not the way you think)

I need to establish a T-shaped relationship between three models. Here's my current schema: users...

0 Likes
0 Replies

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.