JustinLien

Experience

1,420

0 Best Reply Awards

  • Member Since 3 Years Ago
  • 64 Lessons Completed
  • 11 Favorites

11th May, 2016

JustinLien left a reply on Encrypting Password With Different Key • 1 year ago

@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 • 1 year ago

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

JustinLien started a new conversation Encrypting Password With Different Key • 1 year ago

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

14th September, 2015

JustinLien left a reply on Dingo And JWT • 2 years ago

@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 • 2 years ago

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 • 2 years ago

@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? • 2 years ago

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

27th May, 2015

JustinLien left a reply on How To Throw TokenMismatchException • 2 years ago

@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 • 2 years ago

@krballard94 so how do you throw that exception?

JustinLien started a new conversation How To Throw TokenMismatchException • 2 years ago

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? • 2 years ago

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,
],

21st April, 2015

JustinLien left a reply on Ajax Request Problem In Laravel 5 • 2 years ago

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');

27th March, 2015

JustinLien left a reply on Flysystem With Amazon S3 • 2 years ago

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

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

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.