pingcrm/app/Model.php

22 lines
395 B
PHP
Raw Normal View History

2019-03-18 08:53:00 -03:00
<?php
namespace App;
use Illuminate\Support\Facades\App;
use Illuminate\Database\Eloquent\Model as Eloquent;
abstract class Model extends Eloquent
{
protected $guarded = [];
public function getPerPage()
{
return 10;
}
public function resolveRouteBinding($value)
{
return $this->where('id', $value)->withTrashed()->first() ?? App::abort(404);
}
}