Laravel 5.1 for Beginners
4.7 (10 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
218 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Laravel 5.1 for Beginners to your Wishlist.

Add to Wishlist

Laravel 5.1 for Beginners

Learn the basics to start coding in the hottest most popular PHP framework in the industry.
4.7 (10 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
218 students enrolled
Last updated 10/2015
English
Current price: $10 Original price: $40 Discount: 75% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 2.5 hours on-demand video
  • 1 Article
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Set up an Environment appropriate for Laravel production
  • Understand basic workflow
  • Understand the file structure
  • Understand the syntax
  • Have skills needed to keep improving their skillset
View Curriculum
Requirements
  • Basic PHP syntax
  • Basic Object Oriented Programming concepts knowledge
  • How the internet works as far as requests and responses
Description

This course will be a project based course that will have a final product, a website, while each lecture touches on a new feature of the Laravel technology. We will build a basic blog website where you will learn how routing works, how database is integrated, forms, authentication, security and much more. All you need is a computer with an internet connection, at least to download the proper files at the beginning. You will get the most out of the course by reading the Laravel documentation, which goes into more details then I can go through in a video lecture due to time constraint. But I will cover the most important things. You will also benefit by taking the information I teach and try to apply it to your own custom website. Start small and if structured correctly, you will be able to keep adding more to your application easily. This is called scalability.

Who is the target audience?
  • Students with a basic understanding of webdevelopment and PHP who want to learn the hottest PHP framework right now
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 24 Lectures Collapse All 24 Lectures 02:43:38
+
Setting up the proper Environment for Laravel to run on
2 Lectures 20:18

In order to download specific PHP packages that we will need, especially Laravel, we will need to download a Dependency Manager called Composer. You can find this at getcomposer.org

Installing Composer
07:47

We will go through a somewhat long process of setting of Laravel Homestead, a vagrant virtual box specifically built for Laravel projects, and this is very important as a platform for you to develop Laravel applications. Once you set this up you wont have to do it again.

Install Laravel Homestead (Don't Skip)
12:31
+
Lets get started!
5 Lectures 35:30

When downloading Laravel, the file structure is very overwhelming and hard to know what is going on. This video will try to warm you up to the important folders and files to pay attention to (as a beginner).

Laravel 5.1 File Structure Overview
09:00

Using the PHP Artisan CLI (Command Line Interface)
05:03

We will take a look at one of the core files of our application which is routes.php and this defines what will happen anytime a user visits any page on your site.

Preview 05:54

We will go over a handful of different ways to pass variables through the controller to our view. Our view will be able to use that variable and display it.

Passing Data to our View through the Controller
04:30

Laravel has a special, easy to use, syntax that you can use in your views whenever you need to use a variable or process some logic with a foreach loop, if statement, etc. It isn't mandatory but I would highly recommend you dont skip over this. It makes your coding much easier plus EVERY book, video, or example code online uses it so I suggest you get used to it. You won't want to go back to regular php syntax afterwards.

Using the Laravel's Blade Syntax
11:03
+
Laravels Database - Eloquent ORM
17 Lectures 01:47:46

We will need to set up our database configurations and laravel makes that extremely easy for us. In the background, Laravel uses a PDO connection to which ever database driver we want to use and out of the box it comes with drivers for sqlite, MySQL, Postgres, and SQL Server.

Configure our Database Settings
03:30

Laravel gives us a clean way to make tables in our database with migration files where we can easily design each table. It also gives us an easy way to quickly delete a table and set it back up with the right fields.

Database Migrations
07:57

We will make a migration for our blogs table and give it all of the attributes it will initially need.

Make Migration for our Blogs Table
04:39

On our terminal, we will use php artisan tinker to create the data for a blog entry and persist it to our database.

Persist Data to the Database with PHP Artisan Tinker
06:19

Eloquent ORM (Object Relational Mapping) is an amazing abstraction for writing sql statements. Since its an ORM, the table represents a model in your project.

Using Eloquent ORM
07:21

Create a view for our blogs
05:26

Laravel has a feature called Elixir which is a wrapper class around Gulp. It makes Gulp very very easy to use and it helps developers make the front end development processes much faster with this amazing automation tool.

Laravel Elixir (Gulp Automation Tool for SASS, Javascript, etc.)
10:29

We can give our routes whats called a 'named route' by using the 'as' syntax and this will make it much easier to create href links to that specific route by calling the route by the name you give it. For example

'as' => 'example.route'

Named Routes
04:07

We will generate a RESTful controller by defining a route in our routes.php file by saying route::resource(....). This will clean up our routes.php file

Create a RESTful controller with route::resource
04:38

We will bring in the a cool feature for building Forms called HtmlServiceProvider.

FormBuilder Part 1
05:49

Now we will use this FormBuilder to use some new syntax to write up our form for our blog.

FormBuilder Part 2
07:56

We will write a custom FormRequest class that will validate our input data before it is allowed to be stored in the database. This gives our application an extra layer of protection.

FormRequest (Validation for our form)
06:31

/**********************************************************************

login.blade.php file snippet

**********************************************************************/

<div class="container-fluid container-top-extra">

<div class="row">

<div class="col-md-8 col-md-offset-2">

<div class="panel panel-default">

<div class="panel-heading">Login</div>

<div class="panel-body">

@if (count($errors) > 0)

<div class="alert alert-danger">

<strong>Whoops!</strong> There were some problems with your input.<br><br>

<ul>

@foreach ($errors->all() as $error)

<li>{‌{ $error }}</li>

@endforeach

</ul>

</div>

@endif

<form class="form-horizontal" role="form" method="POST" action="{‌{ url('/auth/login') }}">

<input type="hidden" name="_token" value="{‌{ csrf_token() }}">

<div class="form-group">

<label class="col-md-4 control-label">E-Mail Address</label>

<div class="col-md-6">

<input type="email" class="form-control" name="email" value="{‌{ old('email') }}">

</div>

</div>

<div class="form-group">

<label class="col-md-4 control-label">Password</label>

<div class="col-md-6">

<input type="password" class="form-control" name="password">

</div>

</div>

<div class="form-group">

<div class="col-md-6 col-md-offset-4">

<div class="checkbox">

<label>

<input type="checkbox" name="remember"> Remember Me

</label>

</div>

</div>

</div>

<div class="form-group">

<div class="col-md-6 col-md-offset-4">

<button type="submit" class="btn btn-primary">Login</button>

<a class="btn btn-link" href="{‌{ url('/password/email') }}">Forgot Your Password?</a>

</div>

</div>

</form>

</div>

</div>

</div>

</div>

</div>

@endsection


/**********************************************************************

password.blade.php file snippet

**********************************************************************/

<div class="container-fluid container-top-extra">

<div class="row">

<div class="col-md-8 col-md-offset-2">

<div class="panel panel-default">

<div class="panel-heading">Reset Password</div>

<div class="panel-body">

@if (session('status'))

<div class="alert alert-success">

{‌{ session('status') }}

</div>

@endif

@if (count($errors) > 0)

<div class="alert alert-danger">

<strong>Whoops!</strong> There were some problems with your input.<br><br>

<ul>

@foreach ($errors->all() as $error)

<li>{‌{ $error }}</li>

@endforeach

</ul>

</div>

@endif

<form class="form-horizontal" role="form" method="POST" action="{‌{ url('/password/email') }}">

<input type="hidden" name="_token" value="{‌{ csrf_token() }}">

<div class="form-group">

<label class="col-md-4 control-label">E-Mail Address</label>

<div class="col-md-6">

<input type="email" class="form-control" name="email" value="{‌{ old('email') }}">

</div>

</div>

<div class="form-group">

<div class="col-md-6 col-md-offset-4">

<button type="submit" class="btn btn-primary">

Send Password Reset Link

</button>

</div>

</div>

</form>

</div>

</div>

</div>

</div>

</div>


/**********************************************************************

register.blade.php file snippet

**********************************************************************/

<div class="container-fluid container-top-extra">

<div class="row">

<div class="col-md-8 col-md-offset-2">

<div class="panel panel-default">

<div class="panel-heading">Register</div>

<div class="panel-body">

@if (count($errors) > 0)

<div class="alert alert-danger">

<strong>Whoops!</strong> There were some problems with your input.<br><br>

<ul>

@foreach ($errors->all() as $error)

<li>{‌{ $error }}</li>

@endforeach

</ul>

</div>

@endif

<form class="form-horizontal" role="form" method="POST" action="{‌{ url('/auth/register') }}">

<input type="hidden" name="_token" value="{‌{ csrf_token() }}">

<div class="form-group">

<label class="col-md-4 control-label">Name</label>

<div class="col-md-6">

<input type="text" class="form-control" name="name" value="{‌{ old('name') }}">

</div>

</div>

<div class="form-group">

<label class="col-md-4 control-label">E-Mail Address</label>

<div class="col-md-6">

<input type="email" class="form-control" name="email" value="{‌{ old('email') }}">

</div>

</div>

<div class="form-group">

<label class="col-md-4 control-label">Password</label>

<div class="col-md-6">

<input type="password" class="form-control" name="password">

</div>

</div>

<div class="form-group">

<label class="col-md-4 control-label">Confirm Password</label>

<div class="col-md-6">

<input type="password" class="form-control" name="password_confirmation">

</div>

</div>

<div class="form-group">

<div class="col-md-6 col-md-offset-4">

<button type="submit" class="btn btn-primary">

Register

</button>

</div>

</div>

</form>

</div>

</div>

</div>

</div>

</div>


/**********************************************************************

reset.blade.php file snippet

**********************************************************************/

<div class="container-fluid containter-top-extra">

<div class="row">

<div class="col-md-8 col-md-offset-2">

<div class="panel panel-default">

<div class="panel-heading">Reset Password</div>

<div class="panel-body">

@if (count($errors) > 0)

<div class="alert alert-danger">

<strong>Whoops!</strong> There were some problems with your input.<br><br>

<ul>

@foreach ($errors->all() as $error)

<li>{‌{ $error }}</li>

@endforeach

</ul>

</div>

@endif

<form class="form-horizontal" role="form" method="POST" action="{‌{ url('/password/reset') }}">

<input type="hidden" name="_token" value="{‌{ csrf_token() }}">

<input type="hidden" name="token" value="{‌{ $token }}">

<div class="form-group">

<label class="col-md-4 control-label">E-Mail Address</label>

<div class="col-md-6">

<input type="email" class="form-control" name="email" value="{‌{ old('email') }}">

</div>

</div>

<div class="form-group">

<label class="col-md-4 control-label">Password</label>

<div class="col-md-6">

<input type="password" class="form-control" name="password">

</div>

</div>

<div class="form-group">

<label class="col-md-4 control-label">Confirm Password</label>

<div class="col-md-6">

<input type="password" class="form-control" name="password_confirmation">

</div>

</div>

<div class="form-group">

<div class="col-md-6 col-md-offset-4">

<button type="submit" class="btn btn-primary">

Reset Password

</button>

</div>

</div>

</form>

</div>

</div>

</div>

</div>

</div>

Signing in (Authentication)
12:20

Middleware
03:14

We will use the edit and update method on our Resource Controller to, obviously, edit and update a page. We will also use Form Model Binding to be able to edit or update a particular page, or in our case a blog.

Edit and Update a Page and Form Model Binding
08:44

We will make our views much more readable by taking out the error snippet and our form code and place them in a partials folder. We will then include them into our view which reduces our main view we are using to just one line making it much more readable. We will also learn how to dynamically change something in a partial that may change based on which view it is included in.

Preview 04:37

We will finish off our last RESTful (Resource) Controller method. The destroy method is used to delete an item from the database, and in our case a blog entry.

Delete a Page
04:09
About the Instructor
Michel McAlexander
4.1 Average rating
904 Reviews
50,606 Students
3 Courses
McProgramming

Senior Computer Science major at VCU. I learned Java and other computer concepts/languages as well as math in an addictive manner. I have created many programs and help fellow students constantly. I have a great understanding of Java programming and if I dont know the answer/solution off the top of my head, I know how to find it and grasp it.