Support the ongoing development of Laravel.io →

4,311 Threads

posted 10 years ago

Eloquent Method each

Hi, someone knows how to use Eloquent Method each? I mean, I'm using it but, I can just return value...

0 Likes
2 Replies
Solved

Eloquent Many to Many query

Hello I have following structure Table categories Table posts Table category_post Table users Table...

0 Likes
0 Replies

Sorting database values using usort and Sortby(collection method)

I am trying to use usort and sortby to basically after the code below is 1. sort $featureLists by 'f...

0 Likes
0 Replies
posted 10 years ago

how can I make this the best in models

Hello, I try to make a financial app. Now I have this problem. I have customers which are put into a...

0 Likes
6 Replies

date time format database field

I am using DB::raw how can i format a date field in the database 'DATE_FORMAT(created_at,"%m %j...

0 Likes
3 Replies

Tracing database changes

Hi, is there an easy way, to trace the changes in a database using eloquent? I am using a mySQL data...

0 Likes
4 Replies
posted 10 years ago

Get 10 posts from each category (relationships)

I'm trying to figure out how to get the last 10 submitted posts in each category (by name) and order...

0 Likes
1 Replies
posted 10 years ago

Setting a foreign key on a newly instantiated Eloquent model

Hi. I'm encountering a problem with setting a foreign key on a newly created Eloquent model instanti...

0 Likes
0 Replies

Only created_at, updated_at timestamps are inside SQL when using Model::create()

I have laravel to automatically manage the created and updated timestamps when I create a new model....

0 Likes
3 Replies

MySQL query: where field is not equal to some of the given values

Hi, I have to list some records related to users without the given parameters. Is there any way to m...

0 Likes
3 Replies
Solved

What a way to repeat record and store

$number= Input::get('count'); //send number 4 $text = "hello"; fo...

0 Likes
0 Replies

multiple hasMany

Hi, I got a bit confused. for simple messaging system, consider we have two models: User model &...

0 Likes
1 Replies
Solved

Results of a Query Builder for model eloquent

I'm doing a query using the Query Builder $users = DB::select( DB::raw(" SELECT users.* from us...

0 Likes
0 Replies

Getting search result + content

Hey guys, Hope the title is not too confusing, but here is what I am trying to do: The user enters a...

0 Likes
5 Replies
Solved

Cache::tags(...)->flush() issue: different context in Eloquent observer/event?

Hi, I'm experiencing a strange behavior in the model observer/event callbacks. I'm trying to clear t...

0 Likes
0 Replies

Trying to get property of non-object

my project address:https://github.com/xsmyqf/startlaravel when I visit the routes:startlaravel/publi...

0 Likes
0 Replies
posted 10 years ago

Model relationship to insert related data

Hello, I'm having a struggle with Laravel while trying to make post tags to work... Here is my probl...

0 Likes
2 Replies
Solved

Complex Join Query Not "Working"

Hi there, I'm not new to frameworks and ORMs, but I am new to Laravel and Eloquent. I've just starte...

0 Likes
1 Replies
Solved

Creatable fields

Hey, I'm new to laravel and still learning a lot every day :) But I have already my project in mind...

0 Likes
0 Replies

Migrate and primary keys

Hello, I have trouble creating my tables with the migrate tool. I'd like a table for countries with...

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