erro ao tentar recuperar as categorias do tenant
[Finalizado Pelo Aluno]
 
                        
                  
                                        Criador
                    Valdson Barbosa de Oliveira
                  
                  
                
                Estou passando no Postman: http://food.test/api/categories?uuid=b9172fbe-995e-4059-8c4b-67abdeaff1c6
e me retorna:
<!-- Undefined property: App\Repositories\TenantRepository::$getTenantByUuid (500 Internal Server Error) -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="robots" content="noindex,nofollow" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <title>Undefined property: App\Repositories\TenantRepository::$getTenantByUuid (500 Internal Server Error)</title>
    <link rel="icon" type="image/png"
no TenantRepository.php
<?php
namespace App\Repositories;
use App\Models\Tenant;
use App\Repositories\Contracts\TenantRepositoryInterface;
class TenantRepository implements TenantRepositoryInterface
{
    protected $entity;
    public function __construct(Tenant $tenant)
    {
        $this->entity = $tenant;
    }
    public function getAllTenants(int $per_page)
    {
        return  $this->entity->paginate($per_page);
    }
    public function getTenantByUuid(string $uuid)
    {
        return $this->entity->where('uuid', $uuid)->first();
    }
}
                
                                      Manager
                                                      Carlos Ferreira
                
                
              
              Olá, Valdson!
Tudo bem?
Você tem o seu projeto no GitHub?
Preciso ter uma visão geral dele para conseguir te ajudar a identificar onde errou.
Acredito que onde usa o TenantRepository você não passou o UUID
No aguardo do código completo.
 
                      
                
                                                        Criador
                                    Valdson Barbosa de Oliveira
                
                
              
              resolvido. faltou colocar o uuid. Obrigado
 
                      Precisa estar logado para conseguir responder a este ticket!
Clique Aqui Para Entrar!