Support the ongoing development of Laravel.io →

4,608 Threads

Check if relationship exists between two models (many to many)

I've got a model called Provider and one called Service. A Service has a one-to-many relationship wi...

0 Likes
1 Replies

How to set whereIn update() param?

In the docs, I see DB::table('users') ->where('id', 1) ->update(array(...

0 Likes
1 Replies
Solved

Call to undefined function App\mycrypt() on Artisan Tinker

Hi there folks, I am having a problem on Laravel, since I am a newbie on Laravel Framework, I am wat...

0 Likes
1 Replies

Seeding creates empty fields into databse, but does not write anything into them.

Seeding creates empty fields into databse, but does not write anything into them. **CategoriesTableS...

0 Likes
1 Replies
Solved

Error In Use sync Method via etrepat/baum Package

Hi To manage the categories and sub-categories of used etrepat/baum package. https://github.com/etre...

0 Likes
2 Replies

1. Models problem; 2. Seed problem;

Things are going complicated as I started migrating my project to Laravel 5.x. 1. In my view I'm sho...

0 Likes
3 Replies
Solved

Laravel 5 updating session table user_id column

I'm trying to list online users for Laravel 5. But the user sessions table in my column was constant...

niyazialpay liked this thread

1 Likes
0 Replies
posted 9 years ago

How can I specify the collection name with MongoDB?

From the example I can dothis and set the collection to users_collection. How can I override it for...

0 Likes
1 Replies

SQL raw request modification to get collections

I have to use the following request to get data from DB: $users=DB::select('SELECT id,username, avat...

0 Likes
0 Replies

Define relation for Companies and Groups

Hi all I'm having some issues trying to set up a relationship for two Models. ExCompany and ExGroup....

0 Likes
2 Replies
Solved
posted 9 years ago

firstOrCreate / firstOrNew only creates one property

I have a model on which I'm using firstOrNew. if an entry exists, this code: $a = CustomAssets::...

0 Likes
0 Replies

Has Many Through with Pivot issue

Hi everyone. I have these tables and relative Models (http://laravel.io/bin/kWmrk) network_equipment...

0 Likes
0 Replies

How to Use 'DATEADD' function in Laravel join?

I've a Laravel 4 join as given below: return DB::table(Location::getTableName() . ' as l')->wher...

0 Likes
0 Replies

How laravel create (belogsTo, hasMany, etc..) dynamic properties over models?

For example, if I have the following code: class User extends Model { public function tasks()...

0 Likes
3 Replies
Solved

multiple image with related tables

I intend to create in my backend where it is possible to create workshops. In the workshops we have...

0 Likes
0 Replies

Access denied for user 'homestead'@'localhost'

Hello Laravelers, I have just started learning Laravel on the official website : http://laravel.com/...

0 Likes
3 Replies

Class 'App\DB' not found

Hello friends,Please help me to fix this error. FatalErrorException in news.php line 54: Class 'Ap...

0 Likes
2 Replies
Solved
posted 9 years ago

second Connection to Redis Server

Hi, i´m trying to execute some Redis Commands in a Redis PSUBSCRIBE Loop. It fails with Error: [Pred...

0 Likes
0 Replies

Saving to two models not sure how to get it to work

Hi i'm new to Laravel so I apologize for asking a easy questions, I'm just can't quite figure out my...

0 Likes
0 Replies

Count from a relationship table

Hello, I have those tables : question : id - integer name - string user : id - integer name - string...

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.

© 2025 Laravel.io - All rights reserved.