Вход Регистрация
Файл: system/vendor/illuminate/database/Eloquent/QueueEntityResolver.php
Строк: 42
<?php

namespace IlluminateDatabaseEloquent;

use 
IlluminateContractsQueueEntityNotFoundException;
use 
IlluminateContractsQueueEntityResolver as EntityResolverContract;

class 
QueueEntityResolver implements EntityResolverContract
{
    
/**
     * Resolve the entity for the given ID.
     *
     * @param  string  $type
     * @param  mixed  $id
     * @return mixed
     *
     * @throws IlluminateContractsQueueEntityNotFoundException
     */
    
public function resolve($type$id)
    {
        
$instance = (new $type)->find($id);

        if (
$instance) {
            return 
$instance;
        }

        throw new 
EntityNotFoundException($type$id);
    }
}
Онлайн: 0
Реклама