Support the ongoing development of Laravel.io →

4,311 Threads

Multi-level parent child categories

Hello, I'm very new to laravel and am converting an application I wrote earlier in very unstructured...

0 Likes
2 Replies

Access data from multi nested relations

Hi, i use the following code to get my data with Eloquent: $campaign = Campaign::find(1)->with(...

0 Likes
0 Replies

Joining two tables using Eloquent for multiple database connections

Hello, I am facing a problem with joining two tables using Eloquent for multiple database connection...

0 Likes
0 Replies

Relationships With Staff and statuses

I'm attempting to make a relationship between my roster table and roster_statuses table. I'm wonderi...

0 Likes
5 Replies
Solved
posted 10 years ago

Users can only edit their own posts

Hi guys, How do I make sure that an authenticated user only can edit their own submissions? Do I hav...

0 Likes
5 Replies
Solved

How can i fetch dynamic ip address ?

I have this $location = GeoIP::getLocation('46.188.214.51'); my table looks like this | id | mood...

0 Likes
1 Replies

Help optimising a query

I have a users table and profile (one to one) table. I need data from both to display on their publi...

0 Likes
3 Replies

Distant Relationship HasManyThrough

I'm sure this is a basic question, but I have the following: Model "A" which has many of &...

0 Likes
0 Replies

Has Many Through

Hi, I do not know how to make a relationship, my structure communities id - integer name - s...

0 Likes
0 Replies
posted 10 years ago

Can't get all products from a category

Hi, I'm creating an online shop and I had obviously to use many to many relationships. I've a proble...

0 Likes
3 Replies

Eloquent Outside of Laravel with mongodb

I am trying to connect to mongo db using the eloquent module outside of laravel, i can get it to con...

0 Likes
0 Replies

Is it possible to do ->union with ->paginate?

When i try to do union with paginate i get this error: Cardinality violation: 1222 The used SELECT s...

0 Likes
0 Replies

Query inside foreach Laravel 4 Controller/view

Well, in my view I've a foreach and I display the id of a product with {{$look->item1_id}} but i...

0 Likes
0 Replies

Please help with pivot query

Hi, I have just started playing with Laravel but am having a bit of trouble optimising this query us...

0 Likes
4 Replies

Help to write query

hello i have sql how can i write in Laravel this sql ? please help. (SELECT goods_id, name, img, ano...

0 Likes
2 Replies

Class Error in migrate:refresh

I am trying to refresh the migration using this command. php artisan migrate:refresh My migrations a...

0 Likes
1 Replies

Changin date format and localization

I have changed format date that way: BaseModel.php: use Carbon\Carbon; class BaseModel extends \Elo...

0 Likes
0 Replies

Query Builder results different from SQL results

Hello, I have built a query with the Query Builder and I monitor what SQL is actually executed by du...

0 Likes
3 Replies

morphMany lists error (Call to a member function addEagerConstraints() on a non-object)

I have a problem with using morphMany relations in combination with lists in my model. I do have a M...

0 Likes
0 Replies
posted 10 years ago

When exactly are mutators run?

In the process of writing unit tests, I noticed that my model mutator is only run ONCE, even though...

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.