vendredi 7 mai 2021

my master.blade.php Trying to get the 'full_name' property from a non-object

master.blade.php

  <a class="nav-link dropdown-toggle dropdown-user-link" id="dropdown-user" href="javascript:void(0);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
              <div class="user-nav d-sm-flex d-none">
                <span class="user-name font-weight-bolder"></span>
                  <span class="user-status">Admin</span>
              </div>
                <span class="avatar">
                  <img class="round" src="" alt="avatar" height="40" width="40">
                  <span class="avatar-status-online"></span>
                </span>
            </a>

TicketController.php

use App\Model\Ticket;
use App\Model\User;
use App\Model\Kategori;
use App\Model\Prioritas;
use App\Model\Status;

use Illuminate\Http\Request;

class TicketController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $data = Ticket::with('user','kategori','prioritas','status')->paginate(5);
        return view('admin.crud_ticket.index', compact('data'));
    }

after I run it, an error appears that I don't know on my master.blade.php

Trying to get the 'full_name' property of non-object (View: C: \ xampp \ htdocs \ Helpdesk \ resources \ views \ layouts \ app-admin.blade.php)



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire