Support the ongoing development of Laravel.io →

4,311 Threads

syntax error, unexpected '$test' (T_VARIABLE)

Can someone please tell me why assigning the content of another variable to the protected $table var...

0 Likes
1 Replies

Eloquent Models/Relations

Previously I was using raw SQL statements in a non-Laravel environment so this is a port from that t...

0 Likes
2 Replies
posted 10 years ago

How can I delete duplicate rows from my table, keeping only one copy?

I am currently doing this: if ( $article = Article::where('url', '=', $url)->count() > 1 ) { e...

0 Likes
2 Replies

Nested Select

Hey, not sure how this is done using Query Builder? I want to do something like this: getDetails($id...

0 Likes
1 Replies
posted 10 years ago

Sorting with Eloquent

I have this complicated database with many tables related to each other. Eloquent makes my life easi...

0 Likes
8 Replies

Return Query as JSON

When calling the following select how do you return it as JSON $users = DB::table('users')->g...

0 Likes
4 Replies

Accessors in where clause.

Hello, I have a table which contains a datetime field like this: (2014-07-30 16:54:12) That table de...

0 Likes
2 Replies

Schema Builder: Check Constraints

Is there a way to define check constraint clauses within schema builder? Thanks!

0 Likes
0 Replies

NotFoundHttpException

I am using laravel 4.. Receiving error "Symfony \ Component \ HttpKernel \ Exception \ NotFound...

0 Likes
1 Replies

DB::Table query returns array

I am doing a simple SQL statement $userExists = DB::table('users')->where('email','=', $email)-&g...

0 Likes
2 Replies

How to implement a recursive search in Laravel 4?

I also asked this in stackoverflow, if you wanna see better the code here is it> http://stackover...

0 Likes
1 Replies

Laravel4 is not creating session

I am using Auth::attempt($credentials, $rememberMe) for login user. It was working fine but suddenly...

0 Likes
2 Replies
posted 10 years ago

Eloquent fill with non persistent attributes

I am trying to fill an Eloquent model with attributes from user request. The fillable array is prope...

0 Likes
0 Replies
posted 10 years ago

Model push with many-to-many relation

I am trying to save a many-to-many relationship values using push. What I am doing is: $user = new U...

0 Likes
0 Replies

Eloquent relations

I have tables: Users, Pages, Posts [ One user may have many pages and posts ] User table structure '...

0 Likes
3 Replies

Complex Queries and models

Hey, I'm new to Laravel but I've done quite a bit of searching and could not find any clear solution...

0 Likes
3 Replies

Inserting a non-escaped backslash character into MSSQL with Eloquent

I built a tool that creates usernames and a custom-encrypted password and inserts them into a MSSQL...

0 Likes
1 Replies
posted 10 years ago

Interface not implementing?

I'm using a Repo/Interface setup that creates a repo called EloquentItem which extends the Eloquent...

0 Likes
3 Replies
Solved

Relationship and where statement Eager loading?

Hi All, Im working on a streaming project and i'm just starting to learn laravel. I do have a proble...

0 Likes
0 Replies

Optimize Eloquent query for retrieval of min and max value of relation

Hi there, I've a question regarding the retrieval of a minimum and a maximum value of a field in a r...

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