-
As subject, `BelongsToOne` relation does return desired object instead of collection if we eager load, however it doesn't work with lazy loading. Any idea?
`
$record = Record->first();
dump($reco…
-
Using the command `php artisan wn:model Models/Product` generates `Products.php` inside the `Models` directory as expected but does not add the `\Models` postfix to the namespace and sets the class na…
-
> ### [Laravel 中文文件翻譯對照表與規範](https://github.com/laravel-taiwan/docs/wiki/規範&專有名詞對照)
- [x] artisan.md(@Nationalcat 已認領)
- [ ] authentication.md(@rex-chien 已認領)
- [ ] authorization.md(@rex-chien 已認…
-
Hi. My problem is that I need something like an alias for eager loading in case when I use same relation. For example imagine if I have cms with leads. Every lead has the responsible manager. I wanna …
-
Hi,
I have "virtual" relationship declared as:
```php
public function relationships($request): iterable
{
return [
...iterator_to_array(parent::relationships($request)),
$this->…
-
I want to list all the user which have no role.
-
### Laravel Version
11.7.0
### PHP Version
8.3.7
### Database Driver & Version
PostgreSQL 15.7 and MySQL 8.0.37
### Description
When eager loading a model relationships, the resul…
-
Hello. You are using
```
RecipeIngredient::whereNotIn('id',$ingredients_updated)
->where('recipe_id',$recipe->id)
->delete();
RecipeDirection::whereNotIn('id'…
-
### Is your feature request related to a problem?
When trying to insert relationships into models via a service provider, it is not possible because the mongo specific methods are protected. Laravel …
-
http://trip.ee/content/forum/98465
Solution:
- Remove `$touches` property from `Comment` model.
- Update Content `updated_at` timestamp when comment is first stored