Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
501 lines (358 sloc) 26.2 KB

RoadMap for Laravel

Preface

Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the Model–View–Controller (MVC) architectural pattern.

Why choose Laravel when there are tons of other PHP frameworks ? Here are a few reasons.

  • Security: Its truth that no application is 100% secure and things will depend on how you are using and writing code and its structure. But in comparison to other frameworks Laravel has some good signs of security. Laravel takes care of security with CSRF tokens. These checks on each POST request, so make sure you use them, essentially this protects you from someone changing the nature of the request, i.e. from POST to GET.
  • Emerging star: Lots of web development companies are adopting Laravel very quickly due to its dynamic capabilities and they are getting good response. You can see the popularity in Google trends. In Google trends you will see the difference clearly as how this Laravel framework is gaining popularity and its growing exponentially.
  • Template: One of the best features of the framework is Blade templating engine. It’s so intuitive and working with the typical PHP/HTML so much better and easy. In Laravel, templates are very light weighted from which you can create amazing and decent layouts. You can use different type of widgets of JS and CSS with solid structure. So this also improves your websites load time which helps in websites search engine performance.
  • Integration: Easy integration with many popular FrontEnd Javascript frameworks like VueJS, Angular JS and React makes it even more better choice.
  • Laracast: Laracasts is the excellent tool for learning Laravel. Here you will get both free and paid video tutorials. And from the information you can learn about Laravel. The contents are all made by experts and experienced instructors who offers clear and concise instructions. So if you want to learn Laravel and want to build your carrier around it then Laracast is worth looking at.
  • Artisan: In Laravel, developer needs to interact using a command line that handles the Laravel project environment. Laravel is providing a built-in tool called Artisan, which allows user to perform lengthy programming tasks really quickly which can be easily done by Laravel developers. It is used to create a structured code, and database structure to make it easier to manage the database system.
  • Ready Made apps: With the growing popularity of Laravel and increasing demand of customer asking for similar features now there are various readymade apps available which can be used to add on any feature in Laravel website. This actually reduced effort and in that way reduced cost of development.
  • MVC Support: This is one of the important reasons which make Laravel the best PHP framework that it supports MVC Architecture. Due to this it helps in improving the performance, better documentation, and has multiple built-in functionalities.

Besides this there are other various key factors available in Laravel like Routing system, Application logic, Better code foundation, Suitable for all type of projects, Different API for caching system and many more.

Contents

Community

PS: A forum is an ideal way to interact with other students as we do not lose important discussions, which usually occur in communication via chat apps. Please use our discord group for important discussions.

Team

Curriculum

Curriculum version: 1.0.0 (see CHANGELOG)

Prerequisites

  • This course assumes the student has already taken Frontend domain or have a basic knowledge of front-end.
  • This course also assumes that the student has already taken PHP programming language or reasonably familiar with PHP and its Object Oriented Programming Concepts.

Introduction to MVC architecture in PHP

This course will introduce you to the MVC Pattern using PHP. This course is required, but feel free to skip to the next section if you already know what MVC pattern mean.

Topics covered: models views controllers routes and more

Courses Duration Effort Prerequisites
Introduction to MVC Architecture (alt) 1 week 4-7 hours/week PHP

Core Laravel

All coursework under Core Laravel is required, unless otherwise indicated.

Installation

Topics covered: composer installation in Ubuntu laravel installation in Ubuntu

Concept Best Video Resource Best Text Resource Duration Prerequisites
Installation of Laravel in Debian based systems Laracasts Installation 1 hour none

Tasks :

  • Create a fresh laravel project called blog and view the welcome page.

Models Views Controllers and Routes

Topics covered: basic routing basic views passing data to views setting up database query builder eloquent tinker controllers route model binding and more

Basic Routing and Views

Concept Best Video Resource Best Text Resource Duration Prerequisites
Basic Routing Laracasts Documentation 1 hour Introduction to MVC architecture
Named Routes Laracasts Documentation 0.5 hour Basic Routing
Creating Views Laracasts Documentation 1 hour Basic Routing

Tasks :

  • Create a route /admin and redirect to view admin.blade.php when that route is hit.
  • Name that route as admin
  • Whenever you create a route in the future, name that route.
  • Use this sidebar template for admin.blade.php
  • Create routes /users , /posts , /comments and link All Users , All Posts and All Comments that are present in sidebar to those routes.
  • When you go to /users url or when you click All Users tab on the sidebar, you should be redirected to users/index.blade.php. Posts and Comments should have similar behaviour.

Pass Data to Views

Concept Best Video Resource Best Text Resource Duration Prerequisites
Pass Data to Views Laracasts Documentation 0.5 hr Creating Views

Tasks :

  • Send the following data as posts to All Posts view page and display them.
    • "I am going to Create and Edit Users"
    • "I am going to Create and Edit Posts"
    • "I am going to Create and Edit Comments"
    • "I am going to like and Unlike Posts"

Database Setup

Concept Best Video Resource Best Text Resource Duration Prerequisites
Database Setup Laracasts Documentation 0.5 hr none

Tasks :

  • Setup a database with name blog using mysql or sqlite

Working with Query Builder

Concept Best Video Resource Best Text Resource Duration Prerequisites
Working with Query Builder Migrations and Query Builder Migrations 1 hr Database Setup
Working with Query Builder Migrations and Query Builder Query Builder 1 hr Database Setup

Tasks :

  • Create two tables posts and comments and tasks.
  • posts table should contain title and body. title should be a unique field.
  • comments table should contain a comment_body
  • Empty the All Posts page.
  • Install something which is equivalent to Sequel Pro for your operating System.
  • Using that add some posts to the database and display them on All Posts page.
  • When a user clicks on a individual post, it should redirect to a posts/{id} and show individual post. Later we will associate a comment with a post.
  • Similarly implement for All comments and show individual comment.

Eloquent

Concept Best Video Resource Best Text Resource Duration Prerequisites
Eloquent Laracasts Eloquent 1 hr Query Builder

Tasks :

  • Change the code such that you are using Eloquent instead of Query Builder.
  • Get Hands On Practice with Eloquent using Tinker.

Controllers

Concept Best Video Resource Best Text Resource Duration Prerequisites
Basic Controllers Laracasts Basic Controllers 1 hr Eloquent

Tasks :

  • Change web.php to use Controllers instead of inline functions.

Route Model Binding

Concept Best Video Resource Best Text Resource Duration Prerequisites
Route Model Binding Laracasts Route Model Binding 0.5 hr Controllers

Tasks :

  • Make use of Route Model Binding to show a comment or a post. But instead of binding id , you should bind the title of a post to show a post. So, your route should look something like this post/{title}

FrontEnd

Topics covered: layouts and structures csrf protection form requests form validation laravel mix flash messaging and more

Layouts and Structures

Concept Best Video Resource Best Text Resource Duration Prerequisites
Layouts and Structures Laracasts Layouts 1 hour Models, Views, Controllers and Routes

Tasks :

  • Add two folders partials and layouts in resources/views directory.
  • Create a layout file layouts/master.blade.php in layouts folder and include all markup required like stylesheets, scripts, etc in that file and extend this layout file .
  • Create the folllowing partials and include these partials in admin template.
    • partials/sidebar.blade.php
    • partials/header.blade.php
    • partials/footer.blade.php
  • Grab the markup of those header and footer from some bootstrap template.
  • You can add any other layouts or partials as per your requirement.

Form Requests and CSRF

Concept Best Video Resource Best Text Resource Duration Prerequisites
Form Requests and CSRF Laracasts CSRF Protection 0.5 hour Layouts and Structures
Form Requests and CSRF Laracasts Requests 0.5 hour Layouts and Structures
Form Requests and CSRF Laracasts Inserting and Updating Models 0.5 hour Layouts and Structures

Tasks :

  • Create forms to add a post and a comment to the database.

Form Validation

Concept Best Video Resource Best Text Resource Duration Prerequisites
Form Validation Laracasts Validation 0.5 hour Form Request Data and CSRF

Tasks :

  • Add both client side and server side validations and show appropriate errors when validation fails.
  • Create a partial partials/errors.blade.php so that it can be reused in all types of forms.

Rendering

Concept Best Video Resource Best Text Resource Duration Prerequisites
Rendering Laracasts Blade Control Structures 1 hour Form Validation
Rendering Laracasts Carbon 1 hour Form Validation

Tasks :

  • Use Eloquent Builder functions and Carbon library to display posts such that latest post is at the top. Also display the time stamps of the posts.

Laravel Mix

Concept Best Video Resource Best Text Resource Duration Prerequisites
Laravel Mix Laracasts Laravel Mix 1.5 hour Rendering

Tasks :

  • Install NodeJs and npm in Debian based linux distributions, run
$ sudo apt-get update
$ sudo apt-get install nodejs
$ sudo apt-get install npm
  • Move your css and js files to assets directory and compile them using Laravel Mix.

Flash Messaging

Concept Best Video Resource Best Text Resource Duration Prerequisites
Flash Messaging Laracasts Flash Message 1 hour Models, Views, Controllers and Routes

Tasks :

  • Show a flash message whenever a user signs up or posts or comments on a post.

Relationships

Topics covered: relationships form method spoofing and more

Eloquent Relationships

Concept Best Video Resource Best Text Resource Duration Prerequisites
Eloquent Relationships Laracasts Relationships 1 hour Models, Views, Controllers and Routes

One-to-Many Relationship

Concept Best Video Resource Best Text Resource Duration Prerequisites
One-to-Many Relationship Laracasts Form Method Spoofing 1 hour Eloquent Relationships

Tasks :

  • Add a relationship between posts and comments table. (you have to add post_id field in the comments table )
  • Create partials to add a comment and to show comments of a post.
  • Include those partials in the All Posts page and Show Post page.
  • Add Edit Post and Edit Comment functionalities.

Pivot Tables

Concept Best Video Resource Best Text Resource Duration Prerequisites
Many-to-Many Relationship Laracasts Pivot Table / Many to Many Relatonship 1 hour Eloquent Relationships

Tasks :

  • Add Like functionality.
  • Any user can like/unlike any post.
  • Add necessary Controller methods and views.

Authentication

Topics covered: scaffolding authentication manual authentication

Scaffold Authentication

Concept Best Video Resource Best Text Resource Duration Prerequisites
Scaffold Authentication Laracasts Authentication Quickstart 0.5 hour Database Setup
Scaffold Authentication Laracasts Middleware 1 hour Database Setup
Scaffold Authentication Laracasts Mail to Log 0.5 hour Database Setup

Tasks :

  • Experiment with Scaffolded Authentication. (Do not run php artisan make:authto the existing blog project. Create a new project and just experiment with it. We will be creating our own Authentication workflow instead of using Scaffolded Authentication)
  • Look into the Middlewares section, we are going to use it in the subsequent sections.

Manual Authentication

Concept Best Video Resource Best Text Resource Duration Prerequisites
Manual Authentication - 1 Manual Authentication - 1 Manual Authentication 1 hour Database Setup
Manual Authentication - 2 Manual Authentication - 2 Manual Authentication 1 hour Database Setup
Manual Authentication - 2 Manual Authentication - 2 Named Routes 0.5 hours Database Setup
Manual Authentication - 2 Manual Authentication - 2 Dependency Injection 1 hours Database Setup

Tasks :

  • Setup Custom Authentication.
  • Add relationships between users and posts as well as users and comments. Add all necessary views and Controller methods.

View Composers and Archives

Topics covered: view composers

Archives

Concept Best Video Resource Best Text Resource Duration Prerequisites
Archives Laracasts Raw SQL Queries 0.5 hour Authentication
Archives Laracasts Eloquent Collections 1 hour Authentication

Tasks :

  • Add Archives as shown in the video.

View Composers

Concept Best Video Resource Best Text Resource Duration Prerequisites
View Composers Laracasts View Composers 1 hour Archives

Tasks :

  • Add View Composer for showing archives on all pages.

Advanced Laravel

After completing every required course in Core Laravel, students should choose a subset of courses from Advanced Laravel based on interest. Not every course from a subcategory needs to be taken.

Testing and Seeding

Topics covered: basic testing seeding with Laracasts TestDummy seeding with Laracasts Generators and more

Concept Best Video Resource Best Text Resource Duration Prerequisites
Basic Testing Laracasts Testing - Getting Started, HTTP Tests, Database Testing, Writing Factories, Using Factories, Database Transactions 2 hour Ready Laravel Project
Seeding with TestDummy Seeding with TestDummy Test Dummy - for database seeding 1 hour Ready Laravel Project
Seeding with Laracasts Generators Seeding with Laracasts Generators Laracasts Generators - for database seeding 1 hour Ready Laravel Project

Tasks :

  • Write your own tests to test some features of the project.
  • Learn how to seed Fake Data using TestDummy and Laracasts Generators.

Final project

You are encouraged to do the assignments and exams for each course, but what really matters is whether you can use your knowledge to solve a real world problem.

After you've gotten through all of Core Laravel and the parts of Advanced Laravel relevant to you, you should think about a problem that you can solve using the knowledge you've acquired. Not only does real project work look great on a resume, the project will validate and consolidate your knowledge.

Projects :

Evaluation

Upon completing your final project, submit your project's information to PROJECTS via a pull request and use our community channels to announce it to your fellow students.

Your peers and mentors from the community will then informally evaluate your project. You will not be "graded" in the traditional sense — everyone has their own measurements for what they consider a success. The purpose of the evaluation is to act as your first announcement to the world that you are a developer, and to get experience listening to feedback — both positive and negative — and taking it in stride.

The final project evaluation has a second purpose: to evaluate whether CoderPlex, through its community and curriculum, is successful in its mission to guide independent learners in obtaining knowledge.

Cooperative work

You can create this project alone or with other students! We love cooperative work! Use our channels to communicate with other fellows to combine and create new projects!

Additional Resources

Open Source Projects

There are many open source Laravel Projects to which you can contribute to. Some of them can be found here