PHP code example of jmjl161100 / laravel-relation-updater
1. Go to this page and download the library: Download jmjl161100/laravel-relation-updater library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jmjl161100 / laravel-relation-updater example snippets
use Illuminate\Database\Eloquent\Model;
use Jmjl161100\RelationUpdater\Traits\HasRelationUpdater;
class Post extends Model
{
use HasRelationUpdater;
public function comments()
{
return $this->hasMany(Comment::class);
}
}