Lestah

Lestah

Member Since 2 Years Ago

Experience Points
5,620
Total
Experience

4,380 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
22
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 2
5,620 XP
May
07
3 weeks ago
Activity icon

Replied to Laravel Testing Asserting

Hi Tray2 here it is

' contains "Laboriosam dolorum maxime aspernatur. Voluptate cum ut dolorum sunt in qui unde. Amet aliquid ratione est. Voluptates vero nihil cumque eum." in specified order..

/home/wfh01/Projects/yggdrasil/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:402
/home/wfh01/Projects/yggdrasil/modules/Course/tests/Feature/Admin/CourseDiscussionsTest.php:91

FAILURES!
Tests: 1, Assertions: 6, Failures: 1.
[email protected]P-ProBook-440-G2:~/Projects/yggdrasil# 

i tested this one it will pass when i remove this assertion. assertSeeTextInOrder($discussions->pluck('body')->toArray()); but i need that

May
06
3 weeks ago
Activity icon

Started a new Conversation Laravel Testing Asserting

here's the code for the test I did


public function a_super_user_can_view_a_paginated_list_of_all_discussions()
    {
        // Arrangements
        $this->withoutExceptionHandling();
        $this->actingAs($user = $this->superAdmin);
        $discussions = factory(Discussion::class, 5)->create();


        // Actions
        $response = $this->get(route('discussions.index'));


        // Assertions
        $response->assertSuccessful()
                 ->assertViewHas('resources')
                 ->assertViewIs('course::discussions.index')
                 ->assertSeeText(trans('All Discussions'))
                 ->assertSeeText(trans('Add Discussion'))
                 ->assertSeeTextInOrder($discussions->pluck('body')->toArray());
                 // ->assertSeeTextInOrder($discussions->pluck('commentable_type')->toArray())
                 // ->assertSeeTextInOrder($discussions->pluck('user_id')->toArray())
                 // ->assertSeeTextInOrder($discussions->pluck('parent_id')->toArray())
                 // ->assertSeeTextInOrder([trans('Edit'), trans('Move to Trash')]);
    }

and on my index.blade.php i asserted that a body $resource->body is on there

@section('page:content')
  @container(['attr' => 'grid-list-xl'])
    @layout(['attr' => 'row wrap'])
      @flex(['attr' => 'xs12'])

        @foreach ($resources as $resource)
          <p>@a($resource->body, ['url' => route('discussions.show', $resource->id)])</p>
          <p>{{ $resource->body }}</p>  =========== here it is
          {{-- <p>{{ $resource->commentable_id }}</p>
          <p>{{ $resource->commentable_type }}</p>
          <p>{{ $resource->user_id }}</p>
          <p>{{ $resource->parent_id }}</p> --}}
          <p>
            @can('discussions.edit')
              @a('Edit', [
                'icon' => 'mdi mdi-pencil-outline',
                'url' => route('discussions.edit', $resource->id),
              ])
            @endcan
          </p>
          <p>
            @can('discussions.destroy')
              @a('Move to Trash', [
                'icon' => 'mdi mdi-delete-outline',
                'url' => route('discussions.destroy', $resource->id),
              ])
            @endcan
          </p>
        @endforeach

but the error says that it's not there any idea what could have been wrong

Apr
22
1 month ago
Activity icon

Replied to How To Get A Parameter

Hi @nicolasgoosen VerifyAccount is not a controller it's from the Mail class

Activity icon

Replied to How To Get A Parameter

Hi @snapey I'm doing a user email-verification so when the user register's I'm sending an email verification

on my EventServiceProvider i have this

/**
     * The event listener mappings for the application.
     *
     * @var array
     */
    protected $listen = [
        Registered::class => [
            SendEmailVerificationNotification::class,
        ],

        Verified::class => [
            // add listeners like: LogVerifiedUser::class,
        ],
    ];

can't seem to get the id so i can get the name and email of the user who register's

$resource = User::where('id', $user)->get();

then I'm going to pass the $resource on view that view is the email i sent to user

Apr
21
1 month ago
Activity icon

Replied to How To Get A Parameter

hi @tray2 Ive tried that one but still can't get the id

Activity icon

Started a new Conversation How To Get A Parameter

on my web.php i have this route

Route::get('test-verification/{id}', function($id) {
    event(new Registered(User::first()));
});

then on my browser localhost:3000/test-verificatioin/54

i have a VerifyAccount.php

namespace User\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Lang;
use User\Models\User;


class VerifyAccount extends Mailable
{
    use Queueable, SerializesModels;

    /**
     * The User object.
     *
     * @var \User\Models\User
     */
    protected $user;

    /**
     * Create a new message instance.
     * @param  \User\Models\User $user
     * @return $this
     */
    public function __construct(User $user)
    {
        $this->user = $user;
    }

    /**
     * Build the message.
     * @param  object  $event
     * @param  \User\Models\User $user
     * @return $this
     */
    public function build(User $user)
    {
        $resource = User::where('id', $user)->get();
        //$resource = User::all();
        dd($user);
        //dd($resource);
        //return $this->view('preview.report', compact('resource'));
        return $this->view('theme::preview.report')->withUser($this->user);
    }
}

there's no error but when i dd($user) i failed to the get the parameter i pass on