-
This repository has the only purpose to control version of Laracast's tutorial project for Laravel 5.4, though I'm using 5.5 and checking what is different. I'll do this README.md a sort of diary for my progress and what I learned.
-
The classes are from Laracasts. They are great, check them out.
-
Until 17/09/2017, I've watched until lesson 13. I'll update this list better later so I won't need to write it down all at once.
Installing Laravel, using basic dependencies just like the docs recommend me, Composer installation as well.
laravel new [nameproject]
Basic routing and views knowledge, there is a directory for routes, separated between api
and web
, and views that are inside resources
folder and is based on the use of Blade engine. Routing defines where your resources are going to be processed and, with that said, respect MVC software architecture, we can define which controller
will take care of business logic.
Route::get('/', function () {
return view('greeting', ['name' => 'James']);
});
Some important tool you can have in Mac, but guess what? I don't have one, lol.
You can set up basically any type of SQL database to you application without problem, setting the type in .env
file.
Pass the data to your Views through route, an important information is that when your model is named as the view component created in the resources, it automatically recognizes the object as its model, without the need to define it or checking the information in some type of function inside the Controller.
It teaches you to render information passed from a controller and using Blade engine to make component that are a representation of data. In the matter of model's information, we can use, for example, Carbon
library to fix some datetime format. It's important to mention that the order, what type of info or anything else that involves the logic of the object, you set it up inside the Controller.
We learn that, inside resources
directory, we can set some static files like CSS files, Sass, and any other type of front-end framework you want to use, and you can organize it with Laravel Mix, an abstraction of Webpack for Laravel. Laravel Mix can build files and set it in public folders so it can be served correctly. You must have nodejs
and npm
.
Laravel Mix makes it easy you guard your files inside your sass file or css server-side file and generate a version for public access. The configuration is really easy to make and you need package.json
scripts.
Remember: npm install
As this application is a blog, there is a need to have comments.