Support the ongoing development of Laravel.io →

4,311 Threads

Trying to get data from a many-to-many relationship

Hello! I have a many-to-many relationship with decks and cards, something like this: http://laravel....

0 Likes
4 Replies

Out of date model in controller.

I have a problem with models that get out of sync with the DB. In routes.php I have: Route::model('p...

0 Likes
0 Replies
posted 10 years ago

Empty db table gives error - trying to get property of non-object

When my database table is empty, and i get the error trying to get property of non-object. Now i get...

0 Likes
9 Replies
Solved

Global variable/singleton available to all models/repositorys?

Hi, I need to be able to access the $site_id in most parts of my application as content will differ...

0 Likes
1 Replies

Custom Model Methods

Hi, I'm new to Eloquent & Laravel. I'm following the line of thinking of using Eloquent models f...

0 Likes
2 Replies

Table relationships and writing data problem

Hello, I'm studying programming, and asking for help to make sure I understand these concepts. There...

0 Likes
1 Replies
Solved
posted 10 years ago

Best practice for Eloquent's save() method

Which is better? Using the save() method along with an if statement or without one? Is there any dif...

0 Likes
1 Replies

Creating a Model without Table

Hi, I would like to implement a Model without a table in Laravel. But, I could not find a help/ refe...

0 Likes
1 Replies

Lavel US States Seeder

Is there a script to generate seeds for the US States?

0 Likes
7 Replies
Solved
posted 10 years ago

Model named "Report" does not seem to extend Eloquent properly

A model as simple as this: <?php class Report extends Eloquent { } does not work. When calling a...

0 Likes
2 Replies

Strange Validation behaviour

I've been struggling to figure this out, but with no result so far. This is what I have: My view:...

0 Likes
0 Replies

Ignore duplicate record on insert

Hello all, Is there way to ignore duplicates records on insert. My Code Currently: // Convert json d...

0 Likes
1 Replies
Solved

Inserting multiple related models elegantly.

Hi there, I've got a little snippet of code that really bothers me. I think a little background info...

0 Likes
2 Replies

Order my foreach loop order by date?

Hello, everyone, I am new to all this, even to php, so my questions could be really silly, but any h...

0 Likes
6 Replies
Solved

How to add logic toForeach loop to show just upcoming events, not finished events

Hello again, my dear fiends. So after understanding, how to order data from database in Foreach loop...

0 Likes
5 Replies

Model for multilingual database

Hi, I'm new to Laravel and I really like it so far. I'm having some trouble with a multilingual data...

0 Likes
0 Replies

How laravel updates model ID in the following logic

I Use the following code for Saving a model(Car model) wich belongs to another model (Brand Model) a...

0 Likes
1 Replies

Pagination Problem

Hi i have problem in Pagination if i click page 2, page not redirect, but url change... help me plea...

0 Likes
1 Replies

Querying available permissions for a user , in Role based access control system

Hello everybody I have three tables for implmenting role based access control system: -users -roles...

0 Likes
3 Replies
Solved

One to many error.

Hi, this is my category model <?php class Category extends \Eloquent { protected $fillable = []...

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