JustinLien

JustinLien

Member Since 4 Years Ago

Experience Points 1,420
Experience
Level
Lessons Completed 64
Lessons
Completed
Best Reply Awards 0
Best Answer
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.

11 May
2 years ago

JustinLien left a reply on Encrypting Password With Different Key

@psmall there's not much detail here other than wanting to encrypt with a different key.

E.g., you have 2 laravel env and you want to encrypt a password that is not native that install.

I hope this make it clearer.

JustinLien left a reply on Encrypting Password With Different Key

@bobbybouwmann how would I add this in the controller though?

JustinLien started a new conversation Encrypting Password With Different Key

Is there a way to encrypt a password using different set of APP Key?

14 Sep
3 years ago

JustinLien left a reply on Dingo And JWT

@jeevan628 what does your route look like for the the controller in question?

 public  function __construct(AppointmentRepository $appointmentRepo,BusinessRepository $businessRepository)
{
    $this->appointmentRepository = $appointmentRepo;
    $this->businessRepository = $businessRepository;
    $this->user = $this->user();
    $this->middleware("api.auth");
}

// what does your route look to this controller?

JustinLien left a reply on [Laravel 5] Jwt-auth - Route Specific Tokens

I agreed with Mirdrack and belisar here.

But the answer your question: So the question is, how do I make a token work only for a specific route?

You assign the middleware to the route, e.g., 'middleware' => 'jwt.auth'.

Or you add it in your Controller constructor.

public function __construct()
{
    $this->middleware('jwt.auth', ['except' => ['index']]);  // or use 'only' in place of except
}

JustinLien left a reply on Saving An Intervention Image Instance Into Amazon S3

@SergioGregorutti are you having issue with creating the image or saving it to AWS? Or both?

JustinLien left a reply on What Are The Difference Among Digitalocean, Fortrabbit, Cloudways And The Likes?

It was easy for me. I played the "Price is right" card and went with digitalocean.

27 May
3 years ago

JustinLien left a reply on How To Throw TokenMismatchException

@krballard94 no problem.

I see what I was doing wrong. I am seeing the TokenMismatchException in routes.php line error, but no message. My thrown exception is correct.

The issue was my custom message. I was doing something like this:

// does not work
if ($e instanceof \Illuminate\Session\TokenMismatchException) {

    return 'my custom error message';

}

Where it should have been something like this:

// working example
if ($e instanceof \Illuminate\Session\TokenMismatchException) {

    return response('test');

}

JustinLien left a reply on How To Throw TokenMismatchException

@krballard94 so how do you throw that exception?

JustinLien started a new conversation How To Throw TokenMismatchException

Hi,

I've wrote a custom error handling for TokenMismatchException in app\Exceptions\Handler.php.

How do I correctly throw an exception to see my custom message?

throw new TokenMismatchException;

Does not seem to do the trick.

JustinLien left a reply on How To Specify A Different Database Port?

I second @bashy recommendation. Add port to your config\database.php

'mysql' => [
    'driver'    => 'mysql',
    'host'      => env('DB_HOST', 'localhost'),
    'database'  => env('DB_DATABASE', 'forge'),
    'username'  => env('DB_USERNAME', 'forge'),
    'password'  => env('DB_PASSWORD', ''),
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'port'      => env('DB_PORT', 3306),
    'prefix'    => '',
    'strict'    => false,
],
21 Apr
3 years ago

JustinLien left a reply on Ajax Request Problem In Laravel 5

Double check your URL in your AJAX request.

E.g.

Instead of this: "http://localhost/laravel/categories/orderajax"

Try: http://localhost/categories/orderajax

Or

$(document).ready(function(){
    $('#save').click(function() {
        oSortable = $('.sortable').nestedSortable('toArray');
        $.ajax({
            url: 'categories/orderajax',
            type: "POST",
            data: { sortable: oSortable}
        })
    });

});

Or possible update your route

Route::post('laravel/categories/orderajax','CategoriesController@orderajax');
27 Mar
3 years ago

JustinLien left a reply on Flysystem With Amazon S3

@Drfraker holy (&&^^%###$%!!! This fixed it for me.

Thank you! A full day wasted trying to connect with S3.