2 weeks ago

Use of undefined constant

Posted 2 weeks ago by KalimeroMK

Don't understand the error and how to fix it

Tests\Feature\TicketControllerTest::testSetStatusWithMismatchedClientAndTicket ErrorException: Use of undefined constant ‘client - assumed '‘client' (this will throw an Error in a future version of PHP) (View: /var/www/tether/resources/views/errors/500.blade.php)

public function testSetStatusWithMismatchedClientAndTicket()
        // Arrange
        $otherClient = factory(Client::class)->create(['name' => 'Not Visible Client']);
        $visibleClient = factory(Client::class)->create(['name' => 'Visible Client']);

        $campaign = factory(Campaign::class)->create(['client_id' => $otherClient->id]);

        $participant = factory(Participant::class)->create();
        $person = factory(ClientParticipant::class)->create([
            'client_id' => $otherClient->id,
            'participant_id' => $participant->id,

        $ticket = factory(Ticket::class)->create([
            'client_id' => $otherClient->id,
            'campaign_id' => $campaign->id,
            'participant_client_id' => $person->id

        $user = factory(User::class)->create();

        // Act
        $response = $this->post(
            '/' . $visibleClient->eid . '/ticket/' . $ticket->fresh()->eid . '/set-status',
            ['status' => 'escalated']

        // Arrange

and the blade


        body {
            display: block !important

    <div class="login loginBg" ng-cloak>
        <md-content class="md-padding loginBg">
            <md-card class="md-whiteframe-2dp">

                <md-card-content layout="column" layout-align="center center">

                    <h1 class="md-display-2 logo">tether</h1>
                    <h6 style="text-align:center">Internal Server Error (#500)</h6>
                    <a href="{{ route(‘client-prefix.launchpad.index’, [‘client’ => ClientContext::get()->eid]) }}">Return
                        to launchpad</a>




Please sign in or create an account to participate in this conversation.