Support the ongoing development of Laravel.io →

4,311 Threads

Relationships to JSON?

So i have User model and Articles model. When i return User::all()->toJson(); i get only user atr...

0 Likes
4 Replies
Solved

Multi Tenancy

So, I got sick of reinventing multi tenancy over and over again. I got so sick of it in fact, that I...

0 Likes
2 Replies

Issues in counting user login on every login.

Hi gues i am working on a login functionality that increments the "no of login times" tabl...

0 Likes
7 Replies
Solved

Question regarding aggregate in Query Builder

I am querying a table and I wonder why Laravel make a count(*) query before my query that spend addi...

jeanali liked this thread

1 Likes
5 Replies

Model relationship Eloquent (newbee)

Hi Guys, I'm recently decided to make a switch to start coding with Laravel. I will try to specify m...

0 Likes
2 Replies

attach() throws error when given array of ids with additional pivot data

Example in the docs: $user->roles()->attach([1 => ['attribute1' => 'value1'], 2, 3]); So...

0 Likes
0 Replies

convert query mysql to Eloquent?

Hello, I need convert query from mysql to eloquent mysql Query SELECT count('id_sale') FROM sales J...

0 Likes
0 Replies

Eloquent where 'and', 'or' statement

I'm trying to write this first piece of line in Laravel. I thought I got it right, but not. I hope t...

0 Likes
1 Replies
Solved

Check if form has posted Laravel 5

I'm trying to see if the form has been posted but this method does not seem to work if(Request::is_g...

0 Likes
1 Replies

How to compare json array in Laravel 4

There is one problem which I can't solve. I need to show a response only for users whose user_id was...

0 Likes
0 Replies

Using a preloader to return data

I'm using CURL to process data that is sent to an API cross site. When I get the data back to displa...

0 Likes
0 Replies

Using AJAX or CURL?

I am using the expedia API and I can send request using CURL. Using Laravel 5, am I better to stick...

0 Likes
0 Replies

Non autoincrement id for a model returning 0 on id when created

I have in my model several tables where the primary key it's not autoincremental, but it's a varchar...

0 Likes
1 Replies
Solved

Best practices for responsive view?

#Background My Controller is loading several items (from an Eloquent Model) and passing them into th...

0 Likes
0 Replies

Using carbon to get next weeks dates.

I have a web page that lists events, it is split into 2 categories: This week (today is FRIDAY so t...

0 Likes
3 Replies
posted 9 years ago

Summing pivot data

I have a model with a belongsToMany relationship with an additional pivot column. public functio...

0 Likes
0 Replies

Default value in model binding

Route::resource('profile', 'ProfileController');//-> $router->bind('profile}', function ($use...

0 Likes
0 Replies

Using a normal model for logic

I have a search destination, arrival and departure data form that I have on every page in my templat...

0 Likes
2 Replies
Solved
posted 9 years ago

Question and Answer sequencing

I'm sure there's a good solution to this, but I've been staring at it all day and my brain is fried....

0 Likes
1 Replies

Do i really need foreign keys in database to use eloquent ?

Do i? Lets say that my db is going to be well maintained by one person (me) and that no other applic...

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.