• Deploying Laravel Applications in AWS

    Image Source What is Laravel?  Laravel is a free and open source PHP framework that provides a set of tools and resources for building PHP applications. It is known for its ease of use, provides extensive features and a complete ecosystem of packages and extensions. For example, it provides useful functions like token based authentication, unit testing, and file upload out of the box Laravel provides powerful database tools including an Object Relational Mapper (ORM) called Eloquent and built-in mechanisms for database migration and seed generation. The command-line tool Artisan allows developers to bootstrap new models, multiple controllers, and other pre-built application components. Why Choose AWS For Your Web Application? …

  • Laravel: How to avoid redirecting to home after login?

    If you are working on a Laravel 5.1 based project and using Auth class for authentication purpose, chances are you would have faced issue of redirecting to home after login. While docs say that you can override the behaviour by setting the $redirectedPath value. Thing is it will still not work. After wasting a reasonable time, I figured out the issue. By default Auth constructor is defined as:   public function __construct() { $this->middleware('guest', ['except' => 'getLogout']); } This middleware actually calls  RedirectIfAuthenticated trait. If you go to definition you will find:   public function handle($request, Closure $next) { if ($this->auth->check()) { return redirect('/home'); } return $next($request); } Hardcoded right.…

  • Templates in Laravel 5

    This post is part of LxD Series in which I share my learning process about different technologies. Learn more about LxD here. Ok you saw earlier the design we are going to use for our application. Now it’s time to integrate that design in our Laravel 5 application. Before I go further, let me tell directory structure of Laravel to integrate our design.   Layouts are actually part of views hence they reside in views folder. You have option to put all of your layouts within views->layouts folder or manage it better by dividing it into folders based on your site modules. For instance, Admin, Emails, Site etc. For my sake I created…

  • LxD Series: Laravel Basics

    Before we dive into coding Laravel based app, let’s learn what’s it all about. Laravel is an MVC based framework for rapid PHP based web application development. MVC(Model-View-Controller) is a design pattern used to write softwares. It consist of three parts: Model: This component deals with data and it’s manipulation. Usually you deal with database(RDBMS,NoSQL) here but this is not necessary at all. Your model could interact with a flat file or some remote API for data manipulation. View: The data which was processed or manipulated on model layer is shown by Views to end-users so that they could interact with the app. Controller: Controller actually sits between View and Model…

  • LxD Series: Initial Laravel App design

    I am extremely sorry. It took me a while to make this post. I got totally engaged in other things that made me to stay away from this. I am making this post, as a filler to end inertia. ٰIn previous post I discussed how to install and configure Laravel. In this post I am sharing a few screens of the web app we are going to build.   First screen will be a dashboard which users will see after logging in. Second is showing list of project while the third is entry form. In next couple of posts I will be discussing MVC basics and how Laravel implemented them. As…

  • LxD Series: Starting Laravel 5

        Hello I am back after l00Ong time!! The next thing I am going to cover after AngularJS in LxD series is Laravel 5. I am specifically mentioning 5 because it has been released last month and Laravel 4 or L4 is already in use by various organizations and developers. Laravel 5 has gone thru major overhaul. Beside change in directory structure. Specially it’s now following PSR-4 Autoloader and names-spacing strictly and this is one of the major reasons I picked L5 since it’s going to help learning PHP Standards for next projects. Though I have worked pretty much on Laravel 4 but this series totally assumes that you…