Support the ongoing development of Laravel.io →

4,603 Threads

Autocomplete not showing results

I'm try to add autocomplete to a form and it's not showing the results plus it's saying that 2 rows...

0 Likes
5 Replies

Display data on different views

Hello guys, I have some posts. How can i display for example on profile page just the posts of a spe...

0 Likes
1 Replies

Eloquent object ogininal values are not the same as the attribues

Hi, I want to display a value from my model, but it always gives me '0' as an integer while the colu...

0 Likes
2 Replies
posted 10 years ago

Add onDelete constraint to an existing foreign key?

I'm struggling to get my head around migrations at the minute. I have an existing table with a forei...

0 Likes
0 Replies

model id is 0 inside eloquent created event

Inside my function that is triggered by the 'created' model event, my object id is 0. My id column i...

0 Likes
0 Replies

How to drop table contents with artisan tinker?

I have tried in tinker cli: Schema::drop('pages') but it just drops the table 'pages', how can i dr...

0 Likes
2 Replies
Solved

A wrong query containing 3 models

Hi all, I have 3 tables: books, authors, and publishers. Books-authors and authors-publishers have o...

0 Likes
7 Replies

Laravel relationship

I need help writing a query in eloquent from three tables, where fields table, field_value and users...

0 Likes
0 Replies

4.1 to 4.2 update cant return a simple hasmany object from db gives error!

I am simply just doing this $me = \Auth::user(); return $me->program()->get(); GIVES me; Inva...

0 Likes
1 Replies
posted 10 years ago

Migrations and logical view

Hi, into a migrations file, is it possible to define a logical view creation? or just only normal ta...

0 Likes
0 Replies

I have a lot of form fields on my html page, so how can i quickly map each form field name to its corresponding table column, and insert it that way?

I have a lot of form fields on my html page, so how can i quickly map each form field name to its co...

0 Likes
2 Replies

database relationship

hi i have multiple categories and each category has many posts, i want fetch 4 last posts for each c...

0 Likes
0 Replies

Using "has" to query on pivot table (aka join table)

I've seen some threads that are potentially similar (e.g. http://laravel.io/forum/05-01-2014-eloquen...

fakhriahmedoff liked this thread

1 Likes
2 Replies
posted 10 years ago

SQL Query difficult

I can't "translate" the SQL Query below to Laravel, how I can make this? SELECT SUM(transa...

0 Likes
7 Replies
Solved

[Package] Laravel single table inheritance

#What is Laravel Single table inheritance? Laravel Single table inheritance is a Laravel4 package to...

0 Likes
1 Replies

Controllers vs Models relations best practice

Hello, I am making a community site for pet lovers and I am facing a design question. Lets say I hav...

0 Likes
9 Replies
posted 10 years ago

Creating queries that use tables from more than one database

I need to be able to execute mysql queries that utilize tables from more than one database in the sa...

0 Likes
4 Replies

Relationships problem

Hello guys, I'm trying to make a post with comments system but i'm stuck at the part with relationsh...

0 Likes
0 Replies

Injecting queries to models

Hi there, today I was re-doing the structure of my application and I had this problem: 1 table conta...

0 Likes
0 Replies

get the last record in each group

object(Illuminate\Database\Eloquent\Collection)#651 (1) { ["items":protected]=> array(8...

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