Support the ongoing development of Laravel.io →

4,313 Threads

Searching for newest data and oldest data from the DB.

How do i use Eloquent to search for newest and oldest records from the database.

0 Likes
4 Replies
posted 6 years ago

How do I integrate a custom sql into a model

Hi, I am using Eloquent with Codeigniter, and I have a model that has multiple one to many and many...

0 Likes
1 Replies

DB::select with raw where

Hey, I'm having a hard time compiling the DB:: or preferably Eloquent code for a query that involves...

0 Likes
6 Replies
Solved

403 error on from submit

Hi. I faced with some problems on my Laravel project. Script works correctly on WAMP but when I uplo...

0 Likes
0 Replies
posted 10 years ago

Eloquent get count relation

My Eloquent model Module has many Sections. I can query thus: Module::with('sections')->get();...

0 Likes
9 Replies
Solved

Upgraded from Laravel 5.4 to Laravel 5.5 getting error.

Just updated a Laravel project from Laravel version 5.4 to 5.5. Just after that getting the followin...

0 Likes
1 Replies

updateOrCreate large number of records

I have a relatively large number of records that will need to be updated once a minute (anywhere fro...

0 Likes
1 Replies

Can I add a where condition on the belongsToMany join?

Hi, having this relation public function programs() { return $this->belongsToMany...

0 Likes
0 Replies

How to get Image from MS SQL Server Database

How to get Image from MS SQL Server Database. Column DataType: Image ?

0 Likes
2 Replies

Best option , Laravel Many to Many or Not

Hello guys , does some one could help me ? I am developing a real estate website , something like th...

0 Likes
2 Replies

Laravel way to generate Affiliate Referral Tree

can anyone help me in getting this done correctly ? I have asked question on Stack over flow and tri...

0 Likes
1 Replies

Use Eloquent to Query only master table

I use PostgreSQL with partitioning by one table. Here's my quesrtion. Is there any way to query ONLY...

0 Likes
0 Replies

MAX/GROUP BY Query

How would I do the following query using query builder? Preferably without using any raw sql :-) SEL...

janise liked this thread

1 Likes
5 Replies

Sorting by related field

How do I orderBy a field that's in a related table as in: DB::with('relatedTable')->orderBy('rela...

0 Likes
2 Replies

Order and paginate a collection by a releted field using Eloquent

I have these models: Post, Category and User. My goal is to show a paginated and sortable table disp...

0 Likes
7 Replies
posted 10 years ago

Sort by distant relationship

Hello. So I have these Models: Product - for example, a t-shirt ProductVariant - for example, a XL-s...

0 Likes
4 Replies
Solved

convert this query to laravel query

i wont to make this query : SELECT w.wilayah, a.penerima FROM ( SELECT DISTINCT w...

0 Likes
0 Replies
posted 7 years ago

count from 2 3 relations down

Hi, Has anyone managed to count data from 2 tables down a relationship Normally you would do it with...

0 Likes
1 Replies

Get data of one to many, which is got from many to many

My Category model public function firms() { return $this->belongsToMany('App\Firm'); } My Fi...

0 Likes
0 Replies
posted 7 years ago

Eloquent JSON field, selecting attribute produce extra quote

This code: $translation = Translation::where('language_id', 2) ->whereNotNull('data-&...

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.