Support the ongoing development of Laravel.io →

988 Threads

Multi-way Relationship?

Good day, I'm new to laravel and have been attempting to figure out how on earth to do a multi-way r...

0 Likes
2 Replies
Solved

HasMany with Where in Scope

I want to do something like that, but laravels error says Unknown column 'assignable_table.assignabl...

0 Likes
3 Replies
Solved

Problems with Auth::user()

Hi, this should be easy to do, but I'm getting an error and at this point I reallly don't know where...

0 Likes
4 Replies
Solved

Changing Eloquent models database connection at runtime

Is there any way to force Eloquent models to re resolve the connection they were instantiated with?...

0 Likes
3 Replies
Solved

Json response removes key in array :(

Hi dd my array looks like this: array:8 [▼ 0 => "promo\1\images\2.jpg" 1 => &quo...

0 Likes
3 Replies
Solved
posted 7 years ago

foreign keys, how to use it with fresh migrations?

Hi, What is the idea on setting up migrations with foreign keys as a fresh setup? so my idea is to b...

0 Likes
5 Replies
Solved

How to pass data to json from Database?

Hello, Here is my Row Query to get the data from database. $user = DB::table('users')->get(); I w...

0 Likes
7 Replies
Solved
posted 7 years ago

string as foreign key laravel migration not working?

Hi, When i make a migration with a string as foreign key, it don't work, but with an int its working...

0 Likes
1 Replies
Solved

How to get child objects belonging to parent

I have a method that returns all the current user's blogs. User hasMany Blogs and Blog belongsTo Use...

0 Likes
2 Replies
Solved

How do I use chunk to insert large amounts of data into database?

I would like to insert a large number of rows into my database using chunks, but I am not sure I am...

0 Likes
2 Replies
Solved
posted 7 years ago

How to get "base" Eloquent query builder

I'm writing something that is performing an eloquent query on a model called Enquiry. The actual que...

0 Likes
2 Replies
Solved

Return no of correct answers

Hi, I'am new to Laravel, I'am trying to develop Multiple Choice Question Application, I need to get...

0 Likes
2 Replies
Solved
posted 7 years ago

Model events not firing

Greetings... I am updating some models in this fashion: Foo::where('name', '=', 'bar')->update(['...

0 Likes
3 Replies
Solved

Paginating Results with Dynamic Query Builder Filters

I found this tutorial on creating dynamic filters for query builder, allowing me to quickly run thro...

0 Likes
3 Replies
Solved
posted 8 years ago

Eloquent query where() confusion

I don't know how to build an eloquent query for the following: SELECT * FROM table WHERE column1 = v...

0 Likes
5 Replies
Solved

A "Fatal Error Exception" with my new model "Userconfirmation.php"

Written with StackEdit. I was happy with laravel 4.2 until i upgraded to 5.2, By the way i wanted...

0 Likes
1 Replies
Solved

SQLSTATE[42S22]: Column not found: 1054 Unknown column

I have 2 models class BrandModel extends Model { protected $table = 'brand'; public functi...

0 Likes
2 Replies
Solved

Using string as type for id column

Hi, first of all please forgive me my bad english. I am pretty new to laravel so i can't figure this...

0 Likes
2 Replies
Solved

Issue with adding soft deletes in a later migration

Hello, the issue I'm having is that I created a user table as my first migration, then added a migra...

0 Likes
1 Replies
Solved

Three-way pivot table with Eloquent

Hi everyone, Intro I' m building a web application where users can be in zero, one or more teams. Ev...

0 Likes
6 Replies
Solved

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.