Support the ongoing development of Laravel.io →

4,311 Threads

how to get current entry info in laravel eloquent

i have a table in mysql ( ques_id (auto increment , primary) , ques_title (string) ) . By using eloq...

0 Likes
1 Replies

Saving logic in a controller

Hello! It is ok to store saving logic in a controller like this (PostController.php): public fun...

0 Likes
8 Replies

Auth Basic works local but not in server

I created table and the basic authentication works fine locally but when I uploaded to the server ev...

0 Likes
7 Replies

Order by date of a nested model

I'm having difficulty to let the laravel query order by a date field of a nested query. This is what...

0 Likes
2 Replies

Using where and joins in a query returns wrong deleted_at

OK, I have the following piece of code: $projectTwitterStatuses = ProjectTwitterStatus::join('twitte...

0 Likes
0 Replies
posted 10 years ago

From a table with two relations to the same table

Hello I have a table like $table->integer ('participant_left_id')->unsigned ()->nullable ()...

0 Likes
0 Replies

Do some formatting after getting an object from DB

Hi there! I've got a problem. I have some fields that have to be formatted after fetching them from...

0 Likes
8 Replies

Convert sql into Eloquent or Query Builder (group_concat ,subquery)

Hi Can anyone help me to fix this issue. SELECT *, (SELECT group_concat(CASE WHEN d.disciplineNam...

0 Likes
0 Replies
posted 10 years ago

Public properties in Eloquent class

I have the following class: class Property extends Eloquent { public $id; public $date; publ...

0 Likes
6 Replies
Solved
posted 10 years ago

scope with select

public function scopeGroupByMonth($query) { return $query->select(DB::raw('*, MONTH(display_da...

0 Likes
2 Replies
Solved

How can I tell if a many-to-many sync() actually changed anything?

I need to have a way to tell if the many-to-many sync() process actually changed anything (as oppose...

0 Likes
2 Replies
posted 10 years ago

Undefined namespace Eloquent Sluggable

I have followed the installation guide from here: https://github.com/cviebrock/eloquent-sluggable#el...

0 Likes
4 Replies
Solved

Route / Model Binding for 300+ Tables

Loving Laravel so far! I want to create a huge REST API Web service that allows me to connect to pot...

0 Likes
4 Replies

Saving data array using Eloquent ORM saves only one data row not multiple row

Hi i have a problem saving multiple data using array extracted from explode. heres the code The Arti...

0 Likes
2 Replies
Solved

Check if conversation exists

I'm creating an app where users can send messages to each other. These are my models and relationshi...

0 Likes
2 Replies
Solved

Creating relationships with enumerated tables

My current project has a form creation feature. For each form created, there is also a table created...

0 Likes
0 Replies

Include "0"'s when grouping by date

I found this question/answer on SO and it is pretty much the same question/answer I was going to pos...

0 Likes
7 Replies
Solved

How to handel concurent updates that happen to a model while you have it open.

I have a problem where I have to get an Eloquent model read the data then call a complex stored proc...

0 Likes
1 Replies
Solved

Generic Model in a Package to accept additional properties

Hi, I'm still learning for best practice of PHP OOP pattern. I'm currently try to create Cart compon...

0 Likes
2 Replies

User model not saving

Hi all, I have a user which I'm updating a status on depending on if they have verified their email...

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