Krisell

Krisell

Member Since 2 Years Ago

Experience Points 81,810
Experience Level 17

3,190 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 777
Lessons
Completed
Best Reply Awards 6
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

21 Jun
1 month ago

Krisell left a reply on My Component Not Rendering Some Elements

You're setting v-text of the wrapping component, which means that the contents will be replaced by that text.

01 Feb
6 months ago

Krisell left a reply on Vue Component Not Showing

I'm not sure which version is bundled with Laravel now, but if you're using an updated version of Laravel Mix, try:

require('./components/Auth/Register.vue').default
06 Sep
11 months ago

Krisell left a reply on Does "Chunk" Actually Make Multiple Queries?

User::all() will run the query and store the result in a Collection. I didn't even know that a chunk-method existed there as well, but yes, that will run only ONE query and fetch all results, so any performance-improvement running on a large table will be lost.

04 Sep
11 months ago

Krisell left a reply on Acessing Functions After A Compiling JS

Functions are not (and should not be) attached to the global scope in modern JS. If that's really what you'd like, you can just define it as window.testThisFunction = function () {}

When using mix.js, you run the JS-file through webpack and Babel, and it is put in a separate scope, basically just wrapped within an IIFE.

If you want to access the function from other files, check out ES6 modules, and if you really want to access it globally, you can attach it to the window object. However, a better option might be to create your own custom namespace, which you attach to window, and then use that for your functions/variables that you need easy access to (for instance during development).

03 Sep
11 months ago

Krisell left a reply on Authorizing Nova

Great! Never cache the config in dev/staging-environment to avoid this problem, and make sure your deploy-process includes rebuilding the config cache in production (where you want it for performance reasons).

Krisell left a reply on Authorizing Nova

Just a quick check, did you cache you configs? Double check by running php artisan config:clear

31 Aug
11 months ago

Krisell left a reply on How To Prevent Eloquent From Converting Empty String To Null Automatically?

Is the value sent by HTTP and if so, did you check that it arrives as an empty string and not as null?

I.e. is the problem really in the DB-insertion, or in the HTTP-transmission/reception?

Krisell left a reply on How To Prevent Eloquent From Converting Empty String To Null Automatically?

In App\Http\Kernel.php, you find that a ConvertEmptyStringsToNull-middleware is referenced. If your empty string is sent in an HTTP-request, that's probably the source of your problem.

Krisell left a reply on Laravel Schedule Run Command On A Server

If there is no output, it probably worked. Do you have a command scheduled for ->everyMinute(), or what do you expect to run?

Also, make sure to test each individual command manually (or preferably with automated tests) before running them through the scheduler.

Krisell left a reply on Laravel Schedule Run Command On A Server

Can you run the emailing command manually on the server (not the scheduling)? You'll see the output and if there are any errors when you do. Did you configure email for the server?

Krisell left a reply on Laravel Schedule Run Command On A Server

If the problem is that php is not recognized as a command, you could create an alias for php on the server, or creating a symlink named php and put it in one of the $PATH-folders.

19 Aug
11 months ago

Krisell left a reply on Can't Make Phpunit Configurations To Work With DatabaseMigrations Trait

Have you done any changes to your config/database.php. Make sure you're still referencing env('DB_CONNECTION')

Also, check if the other test-specific environment-variables are being set.

17 Aug
1 year ago

Krisell left a reply on User Activity Feed Trait Error

If you intend for the method to be static, you add it to the declaration protected static function getModelEvents()

Krisell left a reply on User Activity Feed Trait Error

You're missing the parentheses to invoke the method, static::getModelEvents()

Krisell left a reply on Need Help With Factory Test And Phpunit

The error says it's looking for Tests\Feature\App\Role. If you want App\Role, try $roles = factory(\App\Role::class, 5)->create();

In use-statements, App\Role is sufficient since it starts at the root, however then you need to update your usage to $roles = factory(Role::class, 5)->create();

14 Aug
1 year ago

Krisell left a reply on Unknown Custom Element

Oh I see, for some reason I though that trix-editor was a Vue-component not being registered correctly, but what you're saying is that it works fine and has nothing to do with Vue. Yes, I think using the ignore-statement is the right way to go.

Krisell left a reply on Unknown Custom Element

The name of the component has to match the name of the tag, with camel-case being converted to kebab-case (i.e. TrixEditor => <trix-editor>).

Krisell left a reply on My Relationships Do Not Work

If it's a belongTo, shouldn't it be singular?

  public function user()
  {
      return $this->belongsTo(User::class);
  }

Assuming you have a user_id column and not users_id.

From the docs:

Eloquent determines the default foreign key name by examining the name of the relationship method and suffixing the method name with `_id`

Krisell left a reply on Testing Ie11 On Mac With Homestead

This does not really answer your question, but I just wanted to recommend https://www.browserstack.com/ for testing different browsers and devices.

And no, I have no affiliation with Browserstack, I'm just a satisfied user.

Krisell left a reply on 401 On Any New Api Routes

If you look in RouteServiceProvider.php, you'll see that all routes defined in the api.php-file will use the apimiddleware-group and not web.

This will skip session-handling so you are not logged in when hitting those routes. If you only use the api.php for "internal api-calls", you can simply update this to ->middleware('web').

You find the definitions of the middleware-groups in Http/Kernel.php.

I'm guessing the purpose is to speed up api-routes, and also enable for token-based authentication instead of session-based.

Edit: And if you indent to use Laravel Passport, make sure you provide the access token in you api-calls.

12 Aug
1 year ago

Krisell left a reply on Hotel Rooms Booking System.

@larafam Good point, however could we not fetch the availability from the same relation then, and not store any booking-status directly on the room (unless we want to avoid that for performance resons)?

Krisell left a reply on Hotel Rooms Booking System.

In addition to previous comments, it may also be a good idea to use a timestamp, booked_at rather than a boolean value. Make it nullable and the value null means it is not booked, and when booking you set 'booked_at' => Carbon::now(). That way, you can for instance find all rooms booked the last day, week, or whatever.

11 Aug
1 year ago

Krisell left a reply on After Installing Laravel Socialite, Query Scope Method Not Working

I'm sure the solution is simple and someone will be able to help you soon. Just a check, are you using the correct User-class in your controller?

Krisell left a reply on After Installing Laravel Socialite, Query Scope Method Not Working

You're saying it was working fine but not any longer, did you change any of the posted code?

Make sure you don't have a syntax error elsewhere in the User-model which prevents the Query Scope from being registered.

08 Aug
1 year ago

Krisell left a reply on Whats Wrong Here? Cant Insert Data Into Database

You should make sure your app is in development mode so that you get an error message along with the 500-response, that will tell you exactly what's wrong.

APP_ENV=local
APP_DEBUG=true

The +-operator is not for concatenating strings in PHP, if that's what you're trying to do. The . (dot)-operator does that.