www.gusucode.com > Flarum开源的PHP国外手机版论坛 0.1 Beta2 源码程序 > Flarum_v0.1.beta2/flarum/vendor/illuminate/database/Eloquent/QueueEntityResolver.php
<?php namespace Illuminate\Database\Eloquent; use Illuminate\Contracts\Queue\EntityNotFoundException; use Illuminate\Contracts\Queue\EntityResolver as EntityResolverContract; class QueueEntityResolver implements EntityResolverContract { /** * Resolve the entity for the given ID. * * @param string $type * @param mixed $id * @return mixed */ public function resolve($type, $id) { $instance = (new $type)->find($id); if ($instance) { return $instance; } throw new EntityNotFoundException($type, $id); } }