Support the ongoing development of Laravel.io →

4,597 Threads

hasMany relationship not setting parent id and timestamp data when using insert

The author_id keeps coming up empty along with the timestramp data. How can I fix this? mysql posts...

0 Likes
1 Replies
Solved

Returning checked checkboxes based on pivot

Fairly new to MVC and Laravel. I am building a form that allows users (players) to be assigned to /...

0 Likes
1 Replies
Solved

Migrating tables and problems with foreign keys

I have created about 25 database tables in the migrations folder by first creating the files with ph...

0 Likes
2 Replies

Input "less than" character entity, stored as less than sign

I think Laravel can mangle character entities when storing into database. Has anyone else noticed th...

0 Likes
2 Replies

Trouble with Auth::attempt()

Hey everyone, I'm having trouble with auth::attempt() and I'm not quite sure what to google. In chr...

0 Likes
1 Replies

Handling 404 properly - best practice

My url is like domain.com/p/{id} when I insert a wrong ID i get error 500, how do i show error 404 n...

0 Likes
0 Replies

Can you use belongsToMany with non-primary-key fields?

I have the following tables users id email teams id teamlist id team_id email The reason there...

0 Likes
2 Replies

Stuck on this! How to stop these database hits?

Something was causing multiple calls to the User table. I found the solution on some blog that reco...

0 Likes
2 Replies

Custom database library

Hi, I'm new in Laravel and I'm thinking about Laravel for my project. Laravel is great, but for data...

0 Likes
2 Replies

Displaying Whats in a Pivot Table

if this is $items '$items = Item::with('brand', 'images')->get();', and i have this foreach @fore...

0 Likes
1 Replies

Help: Model isn't being mocked properly inside Repository test >_<

Hopefully someone can help me, I've been trying to find out why for the last few hours. I'm trying t...

0 Likes
3 Replies

Create migration hanging on "Generating Optimized Class Loader"

Hi, I'm just starting out with Laravel and managed to get Vagrant/Virtualbox working on my Windows 7...

0 Likes
0 Replies

Weakness of whereRaw: Expression should be enclosed in ( ) automatically

Example resulting in wrong result (is used for a scope-Method): return $query->whereRaw(<<&...

0 Likes
0 Replies

Retrieve a model with selected column(s) only, then update one of those columns?

In one of my controller-functions I retrieve a model: $user=User::where('token',$token)->first();...

0 Likes
1 Replies

UTC timezone for the app/db but EST timezone for the log file?

I have my application timezone set to UTC so that I can store the date/time in UTC in the mysql data...

0 Likes
6 Replies
Solved

Searching many-to-many relationships

Hello folks. I am in need of a little direction on setting up a query on a many-to-many relationsh...

0 Likes
14 Replies
Solved

Best method to apply filter after a read event Model::find(xx)->toArray(); ??

In one of my project, I'd like to output a json value from my mysql table immediately to array when...

0 Likes
0 Replies
posted 10 years ago

How to work with relationships ?

I've created something like laraval.io. That's my table: Schema::create('forum', function(Blueprint...

0 Likes
2 Replies
Solved

Update view when database is updated

Hi! I'm a student and new to Frameworks and Laravel. I was wondering if Laravel 4.X supports dynamic...

0 Likes
2 Replies

Queries based in a previous result

Hi guys, I'm fairly new to Laravel, I'm designing an application which will have an API which return...

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