mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
* Add pivot class property * Add test for pivot class properties * Fix failed test for pivot class properties * Update CHANGELOG.md * Fix failed test
17 lines
450 B
PHP
17 lines
450 B
PHP
<?php
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models;
|
|
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models\Pivots\CustomPivot;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ModelWithPivot extends Model
|
|
{
|
|
public function relationWithCustomPivot()
|
|
{
|
|
return $this->belongsToMany(ModelwithPivot::class)
|
|
->using(CustomPivot::class)
|
|
->as('customAccessor');
|
|
}
|
|
}
|