kennonb

Web Developer at Christ for all Nations

Experience

8,360

0 Best Reply Awards

  • Member Since 4 Years Ago
  • 263 Lessons Completed
  • 2 Favorites

15th November, 2016

kennonb left a reply on Laracasts Refresh • 1 year ago

Love it. This looks fantastic. :) Great job!

I noticed this series' image is missing.

https://laracasts.com/series/how-to-accept-payments-with-stripe

12th July, 2015

kennonb left a reply on Override RubySass Default Dir • 3 years ago

From what I can tell this isn't possible.

You should be able to jump back from the /resources/assets/sass directory to the directory that you're trying. So you should be able to do (since it looks like your vendor folder is in resources):

js
mix.rubySass([
        '../vendor/bootstrap-sass/assets/stylesheets/bootstrap.scss',
        'backend/main.scss'
], 'public/css/admin.css');

10th June, 2015

kennonb left a reply on Mandrill & Merge Tags • 3 years ago

In thinking, I guess I could just send them via SMTP Headers, but was hoping to use their native API methods just incase any values might be truncated.

kennonb started a new conversation Mandrill & Merge Tags • 3 years ago

Quick question, I hope.

Has anyone ever used Laravel's built-in support for Mandrill with Mandrill's merge tags?

https://mandrill.zendesk.com/hc/en-us/articles/205582487-How-do-I-use-merge-tags-to-add-dynamic-content-#provide-merge-data-through-the-api

Not seeing a way to pass this data through, and just wondering if it's possible?

Thanks!

1st April, 2015

kennonb left a reply on [L5] Extending/Rebind Router Or Custom Route Group • 3 years ago

Sorry Trevor.. forgot to check the notification box, so I didn't get notified about your response.

I run this in the render method of the Exception Handler.

if ($request->header( 'host' ) === 'api.domain.com') {
    $response   = new ResponseBuilder(); // A custom class based on Dingo API to handle the responses.
    $statusCode = ( method_exists( $e, 'getStatusCode' ) ) ? $e->getStatusCode() : 500;

    return $response->withError( $e->getMessage(), $statusCode );
}

27th March, 2015

kennonb left a reply on [L5] Extending/Rebind Router Or Custom Route Group • 3 years ago

So I ran into a similar issue as you (since I had a project that was using Dingo's API package). We haven't launched the project yet, but I wanted to get it upgraded to Laravel 5 for some of the new features.

Anyway, the approach I took was to create Middleware for everything that I needed, and inject other things into my controllers (ResponseBuilder to handle the Transformer output). You can then modify the request in whatever ways you need, and continue to pass the request through (pending the functionality that you need).

So a sample route:

Route::group( [ 'prefix' => 'api/v1', 'middleware' => 'auth'], function() {
    Route::get( '/endpoint', 'ApiController@endpoint' );
} );

You can use this method to pass variables through, depending on your needs. http://laravel.io/forum/10-15-2014-laravel-5-passing-parameters-to-middleware-handlers?page=1#reply-17080

Lastly you can use app/Exceptions/Handler.php to make sure all API requests pass a JSON object back instead of the default error handler. I do this by checking the domain that's being hit (since I have a specific domain tied to all API requests) and modifying those only).

Does that help?

28th September, 2014

kennonb left a reply on OAuth2.0 Server Tutorial • 3 years ago

The rewrite branch from that package, which is updated for v4 of the League's OAuth 2 server, is a pretty robust explanation of the main grants and how to use them within Laravel.

https://github.com/lucadegasperi/oauth2-server-laravel/wiki

16th September, 2014

kennonb left a reply on [5.0] FormRequest: Returning The Saved Data? • 3 years ago

Thanks! Totally makes sense. Not sure why I thought that it was more than just validation. Haha.

kennonb started a new conversation [5.0] FormRequest: Returning The Saved Data? • 3 years ago

Ok, sorry for the probably inane question. I'm sure I'm just overlooking something. But in 5.0, in FormRequest's returned response, I'm not seeing where I would get the returned model that was just saved.

Before, I could simply attach it to a variable and have access to all of the data from the created record, but I'm a bit lost with this new FormRequest implementation.

Edit Your Profile
Update

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