Danny Herran, Author at Danny Herran https://dannyherran.com/author/dherran/ Coding is fun Wed, 20 Apr 2022 14:53:09 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.7 Laravel Sanctum optional route authentication and guard selection https://dannyherran.com/2022/01/laravel-sanctum-optional-route-authentication-guard/ https://dannyherran.com/2022/01/laravel-sanctum-optional-route-authentication-guard/#respond Tue, 18 Jan 2022 22:25:05 +0000 https://dannyherran.com/?p=925 By default, Laravel Sanctum token authentication will either completely block access to protected routes or allow it at the expense of not being able to detect if the user is logged in. However, there are valid scenarios whereby a route should be accessible to guests and at the same time allow bearer token authentication. One […]

The post Laravel Sanctum optional route authentication and guard selection appeared first on Danny Herran.

]]>
https://dannyherran.com/2022/01/laravel-sanctum-optional-route-authentication-guard/feed/ 0
Tailwind CSS with Parcel v2 https://dannyherran.com/2021/08/tailwind-css-with-parcel-v2/ https://dannyherran.com/2021/08/tailwind-css-with-parcel-v2/#respond Sat, 28 Aug 2021 20:19:11 +0000 https://dannyherran.com/?p=917 Getting Tailwind to compile with Parcel v2 is easier than ever. We will leverage the Parcel v2 PostCSS support to automatically compile Tailwind assets with little configuration. I assume that you use yarn for all node packages. If you use npm please use the equivalent commands. Start by initializing your project with: yarn init Then […]

The post Tailwind CSS with Parcel v2 appeared first on Danny Herran.

]]>
https://dannyherran.com/2021/08/tailwind-css-with-parcel-v2/feed/ 0
Stay Meta – a social platform for gamers https://dannyherran.com/2021/07/stay-meta-a-social-platform-for-gamers/ https://dannyherran.com/2021/07/stay-meta-a-social-platform-for-gamers/#respond Fri, 30 Jul 2021 16:24:54 +0000 https://dannyherran.com/?p=902 Reddit, Twitter, Twitch, and YouTube. Gamers and content creators alike use social media platforms to upload their content and stay in touch with their followers. But what if there was another way to condense them into a single, centralized location where all gaming content could converge? This is where Stay Meta comes in. I and […]

The post Stay Meta – a social platform for gamers appeared first on Danny Herran.

]]>
https://dannyherran.com/2021/07/stay-meta-a-social-platform-for-gamers/feed/ 0
Laravel reCAPTCHA v2 Middleware in 3 minutes https://dannyherran.com/2020/11/laravel-recaptcha-v2-middleware/ https://dannyherran.com/2020/11/laravel-recaptcha-v2-middleware/#respond Thu, 05 Nov 2020 17:43:50 +0000 https://dannyherran.com/?p=879 I needed to add reCAPTCHA v2 to a couple of forms and most of the results on Google pointed to these large Composer packages that were simply too much. This article will cover how to do create a new Laravel Middleware to validate reCAPTCHA v2 requests with just a few lines of code. Time to […]

The post Laravel reCAPTCHA v2 Middleware in 3 minutes appeared first on Danny Herran.

]]>
https://dannyherran.com/2020/11/laravel-recaptcha-v2-middleware/feed/ 0
Git squash commits in VS Code https://dannyherran.com/2020/06/git-squash-commit-vs-code/ https://dannyherran.com/2020/06/git-squash-commit-vs-code/#respond Thu, 18 Jun 2020 16:37:49 +0000 https://dannyherran.com/?p=863 If you are looking to squash several commits into one in VS Code without having to use the console, I have a solution for you. First off you need the GitGraph plugin, which simply allows you to see the full git log history of your branches. This is handy when having to interact with specific […]

The post Git squash commits in VS Code appeared first on Danny Herran.

]]>
https://dannyherran.com/2020/06/git-squash-commit-vs-code/feed/ 0
Laravel Fractal pagination with simplePaginate https://dannyherran.com/2019/03/laravel-fractal-simplepaginate/ https://dannyherran.com/2019/03/laravel-fractal-simplepaginate/#respond Fri, 08 Mar 2019 18:29:30 +0000 https://dannyherran.com/?p=845 By default Fractal has native support for Laravel::paginate. Those using simplePaginate() have to resort to either using Fractal Cursors or build their own adapter. In this post, we are going to quickly build an adapter that fully supports Laravel::simplePaginate. This tutorial assumes you are using the amazing Laravel Fractal wrapper provided by the guys at […]

The post Laravel Fractal pagination with simplePaginate appeared first on Danny Herran.

]]>
https://dannyherran.com/2019/03/laravel-fractal-simplepaginate/feed/ 0
Importing Foundation 6.4 ES2016 JS files with your favourite module bundler https://dannyherran.com/2017/11/foundation-6-4-es2016-module-javascript/ https://dannyherran.com/2017/11/foundation-6-4-es2016-module-javascript/#comments Wed, 01 Nov 2017 18:51:05 +0000 https://dannyherran.com/?p=828 With the release of Foundation 6.4, they have moved to a module-based JavaScript architecture. This is great and definitely the way to go. Documentation is a bit lacking in this regard, however. I’ll quickly demonstrate in this article how to set up Foundation with your favourite module-bundler. Lets cut to the chase. Your JavaScript file […]

The post Importing Foundation 6.4 ES2016 JS files with your favourite module bundler appeared first on Danny Herran.

]]>
https://dannyherran.com/2017/11/foundation-6-4-es2016-module-javascript/feed/ 3
Redux or MobX: What I learned after refactoring a medium-sized React app https://dannyherran.com/2017/03/react-redux-mobx-takeaways/ https://dannyherran.com/2017/03/react-redux-mobx-takeaways/#comments Fri, 17 Mar 2017 16:15:43 +0000 https://dannyherran.com/?p=796 State containers are a must for medium to large-sized React applications. The basic idea is to keep the state abstracted from your components and manage it somewhere else. Using a state container like Redux or MobX allows you to share a global centralised state across all your components. This article is not a tutorial per […]

The post Redux or MobX: What I learned after refactoring a medium-sized React app appeared first on Danny Herran.

]]>
https://dannyherran.com/2017/03/react-redux-mobx-takeaways/feed/ 6
State of affairs: Bootstrap 4 vs Foundation 6.3 https://dannyherran.com/2016/03/state-of-affairs-bootstrap-4-vs-foundation-6/ https://dannyherran.com/2016/03/state-of-affairs-bootstrap-4-vs-foundation-6/#comments Mon, 28 Mar 2016 21:07:39 +0000 https://dannyherran.com/?p=767 Bootstrap 4 and Foundation 6 are the latest versions of the most widely used CSS frameworks out there. Foundation 6 is stable whereas Bootstrap 4 hasn’t been released yet. However, before you wonder why I am comparing a stable framework version vs an alpha one, let me set the record straight by saying that Bootstrap 4 […]

The post State of affairs: Bootstrap 4 vs Foundation 6.3 appeared first on Danny Herran.

]]>
https://dannyherran.com/2016/03/state-of-affairs-bootstrap-4-vs-foundation-6/feed/ 63
This is how you upgrade (or downgrade) the PHP version on EasyPHP for Windows https://dannyherran.com/2015/11/this-is-how-you-upgrade-the-php-version-on-easyphp-for-windows/ https://dannyherran.com/2015/11/this-is-how-you-upgrade-the-php-version-on-easyphp-for-windows/#comments Wed, 18 Nov 2015 14:59:27 +0000 https://dannyherran.com/?p=757 Since August 2015, the EasyPHP developers have moved their modules into a called “Warehouse” in which they will host up to date modules for their famous WAMP server. This Warehouse is now subscription based, and if you want to download a module, say, the latest or an old PHP version, you will need to pay […]

The post This is how you upgrade (or downgrade) the PHP version on EasyPHP for Windows appeared first on Danny Herran.

]]>
https://dannyherran.com/2015/11/this-is-how-you-upgrade-the-php-version-on-easyphp-for-windows/feed/ 2