Support the ongoing development of Laravel.io →

4,587 Threads

Foreign key constraint is incorrectly formed

http://laravel.io/bin/Nk3v#2 I thought I had everything working, until I added this last foreign key...

0 Likes
0 Replies
posted 10 years ago

Is updating via the Model less effecient than updating via DB::table?

My question is in regards to doing this: $user = User::find(1); $user->email = '[email protected]'; $u...

0 Likes
4 Replies

Eloquent error: Integrity constraint violation

Hi, this is my first thread so if I doing wrong some things please don't hate me :) I'm using Migrat...

0 Likes
2 Replies

How to validate uniqueness of 3 fields

Hi. I have this table: Schema::create('maps', function($table) { $table->engine = 'InnoDB'; $...

0 Likes
0 Replies
posted 10 years ago

Join multiple tables, order by created_at problem

Can't get this to work properly. The results are not ordered by date and I get duplicates for each c...

0 Likes
0 Replies

Creating Eloquent model with 2 columns?

tableA that contains 2 particular columns. idA, idB tableB has 1 column that those are mapped to. id...

0 Likes
2 Replies

Eloquent select from related table where...

Hi, I've read the eloquent docs, but can't seem to find the answer - am I missing something? I am tr...

0 Likes
2 Replies
Solved

Using Ajax to retrieve data with user input

Hi all, I have an issue I can't seem to figure out..... I want to use Ajax/jQuery to get data from a...

0 Likes
8 Replies

Last record in Eloquent model

Laravel has a first method when accessing an Eloquent model, but is there a way to get the last reco...

0 Likes
1 Replies

Nested query in FROM

Hi! I'm really newbie and I'm not sure how to do queries with Eloquent. My SLQ query is this: SELECT...

0 Likes
4 Replies
Solved

using alias in a join

i have this join: $mains = Main::join('builds', 'mains.build_id','=','builds.id')->where('builds....

0 Likes
1 Replies

using javascript to set a variabe

i have an form that is set to upload an image and update a database with the image data (if needed)....

0 Likes
2 Replies
Solved

How to get timestamp integer instead of Carbon object

My application has to adapt to an existing database which uses integer timestamps instead of string...

0 Likes
2 Replies
Solved

Select DB connections based on condition

Hi Team, I have an application that uses multiple database servers and each db server has two databa...

0 Likes
0 Replies

Search through relationships

Hi! I have a little problem that I'm not quite sure how to solve it. To simplify, lets say that I ha...

0 Likes
4 Replies
Solved

Dynamic classes from eloquent

Hi everybody, I'm just getting started with Laravel and SOLID development, and I'm having trouble fi...

0 Likes
1 Replies
posted 10 years ago

as I can construct the following sql statement

as I can construct the following sql statement SELECT (first_name || ' ' ||last_name) as name,t1.id...

0 Likes
12 Replies

While using Eloquent relationships, user id is not saved

Hello I'm learning Laravel 4, and I came up to Eloquent relationships. I have two models, user and g...

0 Likes
2 Replies
Solved

Where does those calls come from?

Hi, I installed php-debugbar and this is the output I get. select * from `pages`133μs256KB3000000005...

0 Likes
2 Replies
posted 10 years ago

Laravel 4 PDO Connection Failed

Alright so my PDO connection keeps failing for what seems like no reason. I created a separate site...

0 Likes
4 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.