Clean Architecture, like Onion Architecture is one of the popular domain centric architecture. This is my first time trying it on Laravel but in this tutorial, we will create a boilerplate Clean Architecture for Laravel 8 with examples on how to use it.
In your Laravel project, imagine you have objects that mostly have the same methods or features and you want to dynamically create those objects, Factory Design Pattern helps you with that. Laravel uses this pattern when calling methods such as `app('cache')->store('redis')` in driver-based components.
In this tutorial we will update the Angular Client app to and create a form to upload a file to our Laravel API. We will use the Angular reactive forms for validation. Lastly we will create an Angular guard to make the post form only accessible to logged-in users.
Introduction In this tutorial we will create an API route where we can upload a file with title. We will create service classes to reduce the codes in the controller and view-models to reduce the arguments. View-models are optional but is helpful with passing data around from controllers to other classes which I already covered
… Read more
Introduction In the last few parts, we had created the authentication API, get the photos and videos, and was able to have the Angular app login work. Now we can update the client app to show the photos or videos. In this tutorial we show the photos and videos in an infinite scrolling page. Lastly,
… Read more
Introduction In the last tutorials we added OAuth authentication in our Laravel API and had the Angular App login to it. Now we can create a resource URL where we can get the posts with photos and videos. We will format the response with the help of Dingo API’s helper trait and PHP Leagues Fractal
… Read more
In this tutorial we will create an Angular application that will authenticate to a Laravel OAuth server. We will use the authorization code with PKCE flow since the Angular application is an SPA or Single-page-application. In SPAs we can't store the client secret since it will be visible in the browser. So we are going to write the codes that will generate the correct login URL and redirect to it. After logging in to that URL the OAuth server will redirect back to our app where we can get an access token that we can use to request protected resources.
This tutorial will be the first part of multiple posts where we create an Angular SPA (Single Page Application) that uses a Laravel API. For this post we will work on setting up the project then adding authentication and authorization. We will be using Laravel's Passport together with Dingo API.
Introduction In this tutorial we will create an Angular application that authenticates using Authorization Code flow with PKCE. PKCE stands for Public Key Code Exchange and is useful authentication code flow when you know it is not safe for the app to store the client secret such as SPAs (Single Page Apps). Setup To generate
… Read more
Dingo API currently only supports JWT and Basic authentication. In this tutorial we will create an authentication provider so Passport can work with Dingo API to support OAuth.