sktklaus

sktklaus

Member Since 11 Months Ago

Experience Points 4,030
Experience Level 1

970 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 35
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

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

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

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

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

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

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

16 Feb
1 month ago

sktklaus left a reply on Nested Object In Response API

@BRAUNSON - Perfect!

Thank you!

sktklaus started a new conversation Nested Object In Response API

Trainer::find(1) // returns my trainer Trainer::find(1)->fighters()->get // returns all the fighters related to this trainer

How can merge the results to get something like this?

data { trainer_name: "name", id: 1, fighters: [ { "id": 1, "nick": "hazel.hermiston", "battles": "46" }, { "id": 2, "nick": "cormier.cathryn", "battles": "46" }] }

14 Feb
1 month ago

sktklaus started a new conversation Laravel Local Domain

How does Jeffrey use a domain to access his Laravel projects? I'm using Windows and Laravel5.7

14 Aug
7 months ago

sktklaus started a new conversation Laravel Algolia Search

How can I mix this template with laravel route() or asset()?

e.g. My href needs to link to a route with the ID coming from algolia

<a class="white-text" href="{{route('cases.show',result.id)}}">

                <ais-results>
                    <template scope="{ result }">
                        @{window.location.origin}
                        <a class="white-text" href="#">
                            <div class="light-blue darken-4 relative">
                                <div class="parallax-effect valign-wrapper justify-center opacity"></div>
                                
                                <div class="caption center center-align">
                                    <h5>@{{result.client_name}}</h5>
                                    <p>@{{result.created_at}}</p>
                                    <h1 cl style="margin:0">@{{result.project_name}}</h1>
                                    <p class="center case-mobile-padding" style="align-self: center;">@{{result.what_we_did}}</p>
                                </div>
                            </div>
                            <br>
                        </a>
                    </template>
                </ais-results>
02 Aug
7 months ago
10 Jul
8 months ago

sktklaus left a reply on How To Setup Custom If Statement

if I don't set a parameter @admin('something') it returns an error.

@role('owner')

Owner

@endrole

@role('member')

Member

@endrole Can also pass an array of multiple roles

@role(['member', 'owner'])

Member or Owner

@endrole

I'm very new to php / laravel, I found this, but don't know how to adapt

Blade::directive('role', function($roles) {

        $user = auth()->user();

        $userRole = $user->roleOn($user->currentTeam);

        return "<?php if((is_array(with{$roles})) ? in_array('$userRole', with{$roles}) : with{$roles} == '$userRole') : ?>";
});

sktklaus started a new conversation How To Setup Custom If Statement

This returns a bool saying if I'm admin or not

  • Auth::guard('admin')->check()

This returns my role

  • Auth::guard('admin')->user()->role

Following this link https://laravel.com/docs/5.6/blade#custom-if-statements

How can I create something like @admin() To return if I'm admin and

@admin('manager', 'owner', 'administrator') to make a conditional if role == manager or owner or administrator ?

23 Apr
10 months ago

sktklaus left a reply on Laravel Mailables

It returns 'Undefined Variable '

sktklaus started a new conversation Laravel Mailables

If I use this

        Mail::send('emails.jobapplication', $data, function($message) use ($data){
            $message->from('[email protected]');
            $message->to('[email protected]');
            $message->subject($data['name']);
        });

It works but I can't use the mail component

@component('mail::message')
# Introduction

Video Notification Email.
{{$username}}

@component('mail::button', ['url' => ''])
Button Text
@endcomponent

Thanks,<br>
{{ config('app.name') }}
@endcomponent

If I sent with ``` Mail::to('[email protected]')->send(new VideoNotification());

It uses the component, but I can't pass my data, 
How do I fix it?
19 Apr
11 months ago

sktklaus started a new conversation Laravel Html Variables With Vue

Hi,

<b-input type="textarea" placeholder="Compose your masterpiece..." rows="5" name="bio" v-model="job_responsabilities"></b-input>

@{{job_responsabilities}}

In laravel I can use {!! $variable !!} when retrieving data from the database and display as html, not just string.

But is there a way to do the same with v-model?

12 Apr
11 months ago

sktklaus left a reply on Signed-URLs

A bug to update from 5.5 to 5.6, not to use the feature. https://stackoverflow.com/questions/48594851/upgrading-laravel-5-5-to-5-6-error

sktklaus left a reply on Laravel Middleware

Is a new feature, you have to update laravel to 5.6.*

https://laravel.com/docs/5.6/urls#signed-urls

sktklaus started a new conversation Laravel Middleware

In my Routes I have videos/{id} I want to use a Signed URL, which works fine, but I also want to access the page if logged as admin, but I don't know how to use both together. as admin, when I access the page

middleware('signed','role:superadministrator|administrator')

it returns invalid signature

Route::get('/videos/{id}', '[email protected]', function (Request $request, $id, $user, $company) {
  if (! $request->hasValidSignature()) {
    abort(401);
  }
})->name('video')->middleware('signed','role:superadministrator|administrator');

sktklaus left a reply on Signed-URLs

There's a bug when updating from Laravel 5.5.* to 5.6.* Solved it...

11 Apr
11 months ago

sktklaus left a reply on Signed-URLs

I always get Method signedRoute does not exist. I updated my laravel, so I don't know, do I have to create this method?

sktklaus started a new conversation Signed-URLs

How do I use this new feature? Signed-URLs / Signed Routes.

I'm not finding anything but this link - https://laravel.com/docs/5.6/urls#signed-urls and I don't understand how to use it.

In which file I use this?

use Illuminate\Support\Facades\URL;

return URL::signedRoute('unsubscribe', ['user' => 1]); Everything I tried, returns signedRoute is not a method.

There's nothing on Laracast, Youtube, StackOverflow,

Thank you.