Skip to content

Commit 8407b60

Browse files
author
Zubair Ahmed
authored
laravel syllabus split into individual docs (#11)
* laravel syllabus split into individual docs * removed center tag * removed center tag from prereq * removed center tag from mvc * removed center tag from relation * removed center tags * removed center tag from core * removed center tag from test * add names to files and folders * add markdown linter
1 parent 448dc7e commit 8407b60

33 files changed

+1253
-0
lines changed

.gitignore

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+

.markdownlint.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"first-header-h1": false,
3+
"line-length": false
4+
}

package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "learn",
3+
"version": "1.0.0",
4+
"description":
5+
"One of the major struggles with self-learning as developers today is figuring out where to get started with whatever technology you're interested in, and then chalking out your overall learning path from that point forward. There is a lot of unnecessary trial and error that everyone goes through, which is inefficient and something we as developers should try to reduce. The goal of these open source guides is to recommend the best online resources (video + text) to learn any and every technology out there.",
6+
"main": "index.js",
7+
"scripts": {
8+
"test": "markdownlint .",
9+
"precommit": "lint-staged"
10+
},
11+
"lint-staged": {
12+
"*.md": ["markdownlint", "git add"]
13+
},
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/coderplex/learn.git"
17+
},
18+
"keywords": [],
19+
"author": "coderplex <[email protected]> (https://www.coderplex.org/)",
20+
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/coderplex/learn/issues"
23+
},
24+
"homepage": "https://github.com/coderplex/learn#readme",
25+
"devDependencies": {
26+
"husky": "0.14.3",
27+
"lint-staged": "4.3.0",
28+
"markdownlint-cli": "0.3.1"
29+
}
30+
}

web-dev/Backend/laravel/0-preface.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: About Laravel
3+
---
4+
# About Laravel
5+
6+
**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.
7+
8+
## Why Laravel
9+
10+
- **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.
11+
- **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](https://trends.google.com/trends/explore?q=yii,CodeIgniter,Zend%20Framework,Cakephp,Laravel&hl=en-US). In Google trends you will see the difference clearly as how this Laravel framework is gaining popularity and its growing exponentially.
12+
- **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.
13+
- **Integration**: Easy integration with many popular FrontEnd Javascript frameworks like **VueJS**, **Angular JS** and **React** makes it even more better choice.
14+
- **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.
15+
- **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.
16+
- **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.
17+
- **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.
18+
19+
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.
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Community
3+
---
4+
# Community
5+
6+
- You can also interact through [GitHub issues](https://github.com/fcc-hyd/issues).
7+
- We also have a chat room! [Join the chat at [Discord](https://discordapp.com/channels/331374249921216514/335713856427130882)]
8+
9+
> **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.
10+
**Please use our discord group for important discussions**.
11+
12+
## Team
13+
14+
- **Curriculum Founder**: [Bhanu Teja](https://github.com/pbteja1998)
15+
- **Curriculum Maintainer**: [Bhanu Teja](https://github.com/pbteja1998)
16+
- **Contributors**: [contributors](https://github.com/coderplex/learn/graphs/contributors)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Prerequisites
3+
---
4+
# Prerequisites
5+
6+
- This course assumes the student has already taken [Frontend](#front-end) domain or have a basic knowledge of front-end.
7+
- This course also assumes that the student has already taken [PHP](#php) programming language or reasonably familiar with PHP and its Object Oriented Programming Concepts.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Introduction to MVC architecture in PHP
3+
topicsCovered: models,views,controllers,routes
4+
---
5+
# Introduction to MVC architecture in PHP
6+
7+
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.
8+
9+
Courses | Duration | Effort | Prerequisites
10+
:-- | :--: | :--: | :--:
11+
[Introduction to MVC Architecture](https://r.je/mvc-in-php.html) ([alt](https://www.sitepoint.com/the-mvc-pattern-and-php-1/)) | 1 week | 4-7 hours/week | PHP
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Installation
3+
topicsCovered: composer installation in Ubuntu, laravel installation in Ubuntu
4+
---
5+
# Installation
6+
7+
**Topics covered**:
8+
`composer installation in Ubuntu`
9+
`laravel installation in Ubuntu`
10+
11+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
12+
:-- | :--: | :--: | :--: | :--:
13+
Installation of Laravel in Debian based systems | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/1) | [Installation](https://gist.github.com/pbteja1998/a735fad5d843a952c937f7b3ba8f058e) | 1 hour | none
14+
15+
## Tasks
16+
17+
- Create a fresh laravel project called blog and view the welcome page.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Basic Routing and Views
3+
---
4+
# Basic Routing and Views
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Basic Routing | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/2) | [Documentation](https://laravel.com/docs/5.4/routing#basic-routing) | 1 hour | Introduction to MVC architecture
9+
Named Routes | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/2) | [Documentation](https://laravel.com/docs/5.4/routing#named-routes) | 0.5 hour | Basic Routing
10+
Creating Views | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/2) | [Documentation](https://laravel.com/docs/5.4/views#creating-views) | 1 hour | Basic Routing
11+
12+
## Tasks
13+
14+
- Create a route `/admin` and redirect to view `admin.blade.php` when that route is hit.
15+
- Name that route as `admin`
16+
- Whenever you create a route in the future, name that route.
17+
- Use [this](https://gist.github.com/pbteja1998/011df2c0209e3b63fd3dce281451d328) sidebar template for `admin.blade.php`
18+
- Create routes `/users` , `/posts` , `/comments` and link `All Users` , `All Posts` and `All Comments` that are present in sidebar to those routes.
19+
- 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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Pass Data to Views
3+
---
4+
# Pass Data to Views
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Pass Data to Views | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/5) | [Documentation](https://laravel.com/docs/5.4/views#passing-data-to-views) | 0.5 hr | Creating Views
9+
10+
## Tasks
11+
12+
- Send the following data as `posts` to `All Posts` view page and display them.
13+
- **"I am going to Create and Edit Users"**
14+
- **"I am going to Create and Edit Posts"**
15+
- **"I am going to Create and Edit Comments"**
16+
- **"I am going to like and Unlike Posts"**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Database Setup
3+
---
4+
# Database Setup
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Database Setup | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/4) | [Documentation](https://laravel.com/docs/5.4/database) | 0.5 hr | none
9+
10+
## Tasks
11+
12+
- Setup a database with name `blog` using `mysql` or `sqlite`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Working with Query Builder
3+
---
4+
# Working with Query Builder
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Working with Query Builder | [Migrations and Query Builder](https://laracasts.com/series/laravel-from-scratch-2017/episodes/6) | [Migrations](https://laravel.com/docs/5.4/migrations)| 1 hr | Database Setup
9+
Working with Query Builder | [Migrations and Query Builder](https://laracasts.com/series/laravel-from-scratch-2017/episodes/6) | [Query Builder](https://laravel.com/docs/5.4/queries) | 1 hr | Database Setup
10+
11+
## Tasks
12+
13+
- Create two tables `posts` and `comments` and `tasks`.
14+
- `posts` table should contain `title` and `body`. `title` should be a unique field.
15+
- `comments` table should contain a `comment_body`
16+
- Empty the `All Posts` page.
17+
- Install something which is equivalent to `Sequel Pro` for your operating System.
18+
- Using that add some posts to the database and display them on `All Posts` page.
19+
- 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.
20+
- Similarly implement for `All comments` and `show` individual comment.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Eloquent
3+
---
4+
# Eloquent
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Eloquent | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/7) | [Eloquent](https://laravel.com/docs/5.4/eloquent) | 1 hr | Query Builder
9+
10+
## Tasks
11+
12+
- Change the code such that you are using Eloquent instead of Query Builder.
13+
- Get Hands On Practice with Eloquent using Tinker.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Controllers
3+
---
4+
# Controllers
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Basic Controllers | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/8) | [Basic Controllers](https://laravel.com/docs/5.4/controllers#basic-controllers) | 1 hr | Eloquent
9+
10+
## Tasks
11+
12+
- Change `web.php` to use `Controllers` instead of inline functions.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Route Model Binding
3+
---
4+
# Route Model Binding
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Route Model Binding | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/9) | [Route Model Binding](https://laravel.com/docs/5.4/routing#route-model-binding) | 0.5 hr | Controllers
9+
10+
## Tasks
11+
12+
- 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}`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Layouts and Structures
3+
---
4+
# Layouts and Structures
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Layouts and Structures | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/10) | [Layouts](https://laravel.com/docs/5.4/blade#template-inheritance) | 1 hour | Models, Views, Controllers and Routes
9+
10+
## Tasks
11+
12+
- Add two folders `partials` and `layouts` in `resources/views` directory.
13+
- 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 .
14+
- Create the folllowing partials and include these partials in `admin` template.
15+
- `partials/sidebar.blade.php`
16+
- `partials/header.blade.php`
17+
- `partials/footer.blade.php`
18+
- Grab the markup of those header and footer from some [bootstrap](https://getbootstrap.com/examples/blog/) template.
19+
- You can add any other layouts or partials as per your requirement.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Form Requests and CSRF
3+
---
4+
# Form Requests and CSRF
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Form Requests and CSRF | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/11) | [CSRF Protection](https://laravel.com/docs/5.4/csrf)| 0.5 hour | Layouts and Structures
9+
Form Requests and CSRF | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/11) | [Requests](https://laravel.com/docs/5.4/requests)| 0.5 hour | Layouts and Structures
10+
Form Requests and CSRF | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/11) | [Inserting and Updating Models](https://laravel.com/docs/5.4/eloquent#inserting-and-updating-models) | 0.5 hour | Layouts and Structures
11+
12+
## Tasks :
13+
14+
- Create forms to add a `post` and a `comment` to the database.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Form Validation
3+
---
4+
# Form Validation
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Form Validation | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/12) | [Validation](https://laravel.com/docs/5.4/validation) | 0.5 hour | Form Request Data and CSRF
9+
10+
## Tasks :
11+
12+
- Add both client side and server side validations and show appropriate errors when validation fails.
13+
- Create a partial `partials/errors.blade.php` so that it can be reused in all types of forms.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Rendering
3+
---
4+
# Rendering
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Rendering | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/13) | [Blade Control Structures](https://laravel.com/docs/5.4/blade#control-structures) | 1 hour | Form Validation
9+
Rendering | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/13) | [Carbon](http://carbon.nesbot.com/docs/#api-formatting) | 1 hour | Form Validation
10+
11+
## Tasks :
12+
13+
- 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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Laravel Mix
3+
---
4+
# Laravel Mix
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Laravel Mix | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/14) | [Laravel Mix](https://laravel.com/docs/5.4/mix) | 1.5 hour | Rendering
9+
10+
## Tasks
11+
12+
- Install NodeJs and npm in Debian based linux distributions, run
13+
14+
```sh
15+
sudo apt-get update
16+
sudo apt-get install nodejs
17+
sudo apt-get install npm
18+
```
19+
20+
- Move your css and js files to assets directory and compile them using Laravel Mix.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Flash Messaging
3+
---
4+
# Flash Messaging
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Flash Messaging | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/29) | [Flash Message](https://laravel.com/docs/5.4/redirects#redirecting-with-flashed-session-data) | 1 hour | Models, Views, Controllers and Routes
9+
10+
## Tasks
11+
12+
- Show a flash message whenever a user signs up or posts or comments on a post.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Eloquent Relationships
3+
---
4+
# Eloquent Relationships
5+
6+
Concept | Best Video Resource | Best Text Resource | Duration | Prerequisites
7+
:-- | :--: | :--: | :--: | :--:
8+
Eloquent Relationships | [Laracasts](https://laracasts.com/series/laravel-from-scratch-2017/episodes/15) | [Relationships](https://laravel.com/docs/5.4/eloquent-relationships) | 1 hour | Models, Views, Controllers and Routes

0 commit comments

Comments
 (0)