Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Письменов Дмитрий Иванович / yourroomads

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • yourroomads
  • app
  • Model.php
  • Jonathan Reinink's avatar
    Initial commit · 14192d0e
    Jonathan Reinink committed Mar 21, 2019
    14192d0e
Model.php 395 Bytes
BlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?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);
    }
}