Laravel-View-Composer-to-share-data-in-partial-views

Use Laravel View Composer to share data in partial views

Ever been in a situation where you have to share some data with multiple views? I have. If you are passing it in every controller pretty soon it will get very messy since you end up duplicating same code in multiple controllers which is against the DRY principle. Let’s learn about view composer provider by Laravel which eliminate this issue and gives you a single place to attach your logic for view data. Continue reading…

Reusable-upload-component-in-Laravel-with-Dropzone

Reusable upload component in Laravel with Dropzone.js

In this post we will create a blade component which we can reuse in any application where we want a file uploader, we will use Dropzone.js to add drag and drop uploading functionality, and laravel as a backend to store the uploaded file, It can upload an image or document which will be configurable using a config file. Let’s get started.

Continue reading…

Building-front-end-for-Twitter-Like-app-on-VueJS

Building front-end for Twitter Like app on VueJS

In the previous post we have built our GraphQL API using Laravel, now let’s focus on the front end and build the Twitter like app using Vue.js, Vuex & Vue router, it will be a completed SPA app, only the auth part will be taken care by laravel out of box authentication, once user logs in then we will load our single page application which we will create in this post using Vue. Continue reading…

Build-API-for-Twitter-like-app-using-GraphQL-in-Laravel

Build API for Twitter like app using GraphQL in Laravel

Recently I have been working on something very amazing for API development, everyone has been using REST to access API, but now things are changing, in the front-end heavy world where things are consistently growing and new features added every week a fixed REST API is not very good option anymore, so what we need then? the answer is GraphQL. Let’s dive into details of this amazing query language and build a Twitter like app API in Laravel using GraphQL. Continue reading…

OAuth-login-using-Facebook,-Google,-Twitter-and-Github-with-Laravel-Socialite

OAuth login using Facebook, Google, Twitter and Github with Laravel Socialite

These days majority of web apps delegate authentication to other providers like Facebook, Google, Twitter, Github and many others. By using OAuth we don’t have to worry about storing user credentials on our server and gives user flexibility to use the same account to authorize on multiple platforms. Continue reading…

Use-MySQL-JSON-field-in-Laravel

Use MySQL JSON field in Laravel

I have been working on an application which needs to store a lot of metadata about user profile, we discussed with the team about using NoSQL database (MongoDB) since its a JSON data set which can be extended and customized for the specific user profile due to its schemaless structure. As we know from MySQL 5.7 JSON field types are supported natively, not only we can store data as JSON but we can run the where clauses on it. So we used this fields type instead of using a full NoSQL DB, Let’s see how we can use it in a Laravel app. Continue reading…

build-a-laravel-roles-and-permissions

Easy roles and permissions in Laravel 5.4

Laravel comes with Authentication and Authorization out of the box, I have implemented many role and permissions based system in the past, using laravel, it’s peace of cake. In this post, we are going to implement a fully working and extensible roles and permissions on laravel 5.4. When we finish we will have a starter kit which we can use for our any future project which needs roles and permissions based access control (ACL). Continue reading…

Youtube like app with Vue.js and Laravel

YouTube like app with Vue.js and Laravel

Earlier we have build our API Create REST API with authentication using Laravel Passport for youtube like app to share videos and comment on them, In this part we are going to implement front-end with Vue.js v2 and improve our API. This will give you very good idea on how you can create app with Vue.js Component, Vue Router and Laravel. Since Laravel 5.4 comes with bootstrap out of the box we will use it for UI. Let’s get started by installing Vue router configuring it. Continue reading…

Vue.js directive to submit and server-side validatate forms using AJAX

Vue.js directive to submit and server-side validatate forms using AJAX

Submitting a Form using classical post request will work but it does don’t give the user feedback while it’s submitting and overall not a great user experience. I find myself creating Laravel apps which uses Vue in many places, but if it’s not a complete SPA (without Vue router),  to make forms more interactive I have created a directive v-ajax-submit which I use religiously in my apps to turn boring forms more fun. Continue reading…

REST API with authentication using Laravel Passport

Create REST API with authentication using Laravel Passport

In this post, we are going to dig into REST API building using Laravel 5.4 and Passport OAuth2 server provided by laravel. This is the next part of my post Advance interactive database seeding in Laravel post, we left off at migration and seeding of the database. Let’s build the API which will be consumed by our vue.js front end later. Continue reading…