<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Seppe Lescur</title>
    <description>The latest articles on DEV Community by Seppe Lescur (@seppelescur).</description>
    <link>https://dev.to/seppelescur</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1104325%2Fa310b9c9-71a2-462d-a1d5-dbe1f3ffb386.jpeg</url>
      <title>DEV Community: Seppe Lescur</title>
      <link>https://dev.to/seppelescur</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seppelescur"/>
    <language>en</language>
    <item>
      <title>Your first Laravel Project</title>
      <dc:creator>Seppe Lescur</dc:creator>
      <pubDate>Fri, 23 Jun 2023 07:12:30 +0000</pubDate>
      <link>https://dev.to/seppelescur/your-first-laravel-project-1c0</link>
      <guid>https://dev.to/seppelescur/your-first-laravel-project-1c0</guid>
      <description>&lt;h2&gt;
  
  
  What is Laravel?
&lt;/h2&gt;

&lt;p&gt;Laravel is a PHP framework&lt;/p&gt;




&lt;h2&gt;
  
  
  Creating a project
&lt;/h2&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;p&gt;Install the following to get started:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IDE like Visual Studio Code&lt;/li&gt;
&lt;li&gt;PHP&lt;/li&gt;
&lt;li&gt;A terminal like Git Bash&lt;/li&gt;
&lt;li&gt;A database like mariaDB and/or a visual database manager like TablePlus&lt;/li&gt;
&lt;li&gt;npm (for JavaScript packages)&lt;/li&gt;
&lt;li&gt;composer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Open your terminal and move to where you want to make your project using the terminal command 'cd' followed by the route. And make a directory using 'mkdir', move into it with cd again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd Documents/WebDesign
mkdir LaravelProject
cd LaravelProject
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your terminal run the following command to make a new Laravel base project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project laravel/laravel .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now test if everything works by running the following command, and going to localhost:8000 in your browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  It works? Great! Moving on...
&lt;/h2&gt;



&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is what?
&lt;/h2&gt;

&lt;p&gt;If you followed the steps above you might open your project in VSCode or another IDE and start to get a little dizzy! Wow, so many folders and files!&lt;/p&gt;

&lt;h3&gt;
  
  
  Routes
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;br&gt;
Folder:&lt;strong&gt;routes/web.php:&lt;/strong&gt;

&lt;p&gt;This file contains all the &lt;strong&gt;routes&lt;/strong&gt; your website can access. this can include pages, but also POST/GET/... requests to edit items.&lt;/p&gt;

&lt;p&gt;There is a standard route included. &lt;strong&gt;Routes&lt;/strong&gt; return &lt;strong&gt;views&lt;/strong&gt; which are in essence pages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'welcome'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this piece of code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the Method is 'get'&lt;/li&gt;
&lt;li&gt;the endpoint is / ('localhost:8000/')&lt;/li&gt;
&lt;li&gt;and when this page is requested the route will return a view 'welcome'.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you want to see all the endpoints you can use the command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan route:list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;When creating routes you can &lt;strong&gt;name&lt;/strong&gt; them using '&lt;strong&gt;-&amp;gt;name('name')&lt;/strong&gt;'
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Views
&lt;/h3&gt;


  
  &lt;p&gt;Folder:&lt;strong&gt;resources/views&lt;/strong&gt;
As stated above, the route returns a view 'welcome'. But what does this mean?


&lt;/p&gt;
&lt;p&gt;Well in this folder you can spot the '&lt;em&gt;*.blade.php&lt;/em&gt;' file. When calling a view, Laravel looks in this folder and finds the file with the same name. In this case 'welcome'. The PHP server processes this file and sends back HTML to the user.&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When returning a view you can pass &lt;strong&gt;variables&lt;/strong&gt; using '&lt;strong&gt;-&amp;gt;with('name', $value&lt;/strong&gt;)'
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;&lt;em&gt;At this point you might want to try to create a new route and return a new view. Make the corresponding changes and say hello world!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Controllers
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;br&gt;
Folder:&lt;strong&gt;app/http/controllers:&lt;/strong&gt;

&lt;p&gt;There are a couple of commands that make your life easier in Laravel! they create the base files. (&lt;em&gt;wow!&lt;/em&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:controller ControllerName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you want a full list of artisan make commands use this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you never worked with a mvc structure, don't worry.&lt;br&gt;
A &lt;strong&gt;controller&lt;/strong&gt; is the step between your &lt;strong&gt;routes&lt;/strong&gt; and your &lt;strong&gt;view&lt;/strong&gt;. It prepares the data needed. This is where you create functions like '&lt;em&gt;store&lt;/em&gt;' to save data, '&lt;em&gt;show&lt;/em&gt;' to return a view, or others to perfom some logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Lets create a controller using the artisan make: command and tinker with it!&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;App\Http\Controllers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//MAKE SURE TO IMPORT CORRECTLY&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Contracts\View\View&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;Illuminate\Http\Request&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TestController&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Controller&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;View&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'hello'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you have a controller you're going to want to edit you &lt;strong&gt;web.php&lt;/strong&gt; file to use the following syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;//MAKE SURE TO IMPORT CORRECTLY&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;App\Http\Controllers\TestController&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/hello'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;TestController&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'hello'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll notice the only part that changed, is where a &lt;strong&gt;function&lt;/strong&gt; used to be. now we call the &lt;strong&gt;controller&lt;/strong&gt; followed by what function we want to call.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  models
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;br&gt;
Folder:&lt;strong&gt;app/models:&lt;/strong&gt;&lt;br&gt;
If you ever did some object oriented programming models will feel a bit familiar. You can create an instance of an existing &lt;strong&gt;model&lt;/strong&gt;, link it to a &lt;strong&gt;database&lt;/strong&gt; (we'll check it out right after this short intro!)

&lt;p&gt;First lets create a new model with the folowing command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="n"&gt;artisan&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="nc"&gt;ModelName&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  connecting to a database
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;br&gt;
I will be using TablePlus.&lt;br&gt;
First lets configure the .env file on the root level.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcf61l26o1rvctli380um.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcf61l26o1rvctli380um.png" alt="Image DB connection in tablePlus"&gt;&lt;/a&gt;&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=DevArticle &amp;lt;- name of database you're gonna create
DB_USERNAME=root
DB_PASSWORD=super secret password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Great! Now just create a &lt;strong&gt;new database&lt;/strong&gt; (ctrl+k &amp;amp; new in tablePlus) and next we're gonna set up &lt;strong&gt;migrations&lt;/strong&gt; for your &lt;strong&gt;model&lt;/strong&gt;.&lt;br&gt;
Once migrations are done everything should be connected.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  migrations
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;br&gt;
Folder:&lt;strong&gt;database/migrations:&lt;/strong&gt;&lt;br&gt;
Migrations are pieces of code that generate (up) and destroy (down) tables in your database.&lt;br&gt;
you can create a &lt;strong&gt;migration&lt;/strong&gt; using the following command:&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:migration create_ModelName+s_table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Once you have your migration it should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    public function up(): void
    {
        Schema::create('modelName+s', function (Blueprint $table) {
            $table-&amp;gt;id();
            $table-&amp;gt;timestamps();
        });
    }
    public function down(): void
    {
        Schema::dropIfExists('modelName+s');
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can add aditional &lt;strong&gt;columns&lt;/strong&gt; by adding more tows to the up function.The syntax is the following $table-&amp;gt;type('column_name'). For example &lt;code&gt;$table-&amp;gt;text('last_name')&lt;/code&gt; or &lt;code&gt;$table-&amp;gt;integer('age')&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Shortcut!
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;br&gt;
However when creating a &lt;strong&gt;model&lt;/strong&gt; you normaly want a &lt;strong&gt;controller&lt;/strong&gt; and &lt;strong&gt;migration&lt;/strong&gt; to go along with it. This can be achieved with:&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:model ModelName -cm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Lets make something!
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;ol&gt;
&lt;li&gt;Let's make a &lt;strong&gt;model&lt;/strong&gt;, &lt;strong&gt;migration&lt;/strong&gt; and &lt;strong&gt;controller&lt;/strong&gt; for an object called '&lt;strong&gt;&lt;em&gt;Car&lt;/em&gt;&lt;/strong&gt;' and lets add some columns in your migration.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    public function up(): void
    {
        Schema::create('cars', function (Blueprint $table) {
            $table-&amp;gt;id();
            $table-&amp;gt;text('model');
            $table-&amp;gt;text('make');
            $table-&amp;gt;text('color');
            $table-&amp;gt;timestamps();
        });
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the code above, we create colums with type '&lt;em&gt;text&lt;/em&gt;'. There are a lot of types, make sure to look up what type you need for your use case.&lt;/p&gt;

&lt;p&gt;When you have edited the &lt;strong&gt;migration&lt;/strong&gt; you can run the following command to create the corresponding tables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Lets create two &lt;strong&gt;endpoints&lt;/strong&gt; for a form, to create a new Car instance.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Route::get('/create',[CarController::class, 'form'])-&amp;gt;name('createCar');
Route::post('/store',[CarController::class, 'store'])-&amp;gt;name('storeCar');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use App\Models\Car;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
class CarController extends Controller
{
    function form() : View {
        return view('createCar');
    }
    function store(Request $request) : RedirectResponse {
        $car = new Car();
        $car-&amp;gt;model = $request-&amp;gt;input('model');
        $car-&amp;gt;make = $request-&amp;gt;input('make');
        $car-&amp;gt;color = $request-&amp;gt;input('color');
        $car-&amp;gt;save();

        return Redirect::back();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;strong&gt;store&lt;/strong&gt; function we create a new instance of the Car model. Then we add the properties using the $request-&amp;gt;input('inputname') to access the submitted form data. Lastly we &lt;strong&gt;save&lt;/strong&gt; and &lt;strong&gt;redirect&lt;/strong&gt; back to the page we where just at.&lt;br&gt;
Now just the views are left!&lt;/p&gt;

&lt;p&gt;Lets create the &lt;strong&gt;createCar.blade.php&lt;/strong&gt;, we'll want the basic html structure (&lt;em&gt;untill we get to layouts&lt;/em&gt;), and add the following form.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"{{route('storeCar')}}"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        @csrf
        &lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;Model
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;'model'&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;'model'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;Make
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;'make'&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;'make'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;Color
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;'color'&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;'color'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Save&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;strong&gt;blade&lt;/strong&gt; files we can use the &lt;strong&gt;@ directives&lt;/strong&gt; for a few things. One of them is &lt;strong&gt;@csrf&lt;/strong&gt; which adds a layer of protection to forms.&lt;/p&gt;

&lt;p&gt;If you implemented these changes you can go to &lt;strong&gt;/create&lt;/strong&gt; and create a new instance of a car. Check your database after saving (make sure to refresh), and there should be a car present!&lt;/p&gt;

&lt;p&gt;In the next part we will check out layout and component files. and we'll display the data we just saved.&lt;br&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Blade layouts
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;br&gt;
While there are a lot of diffrent ways to display pages in Laravel (Inertia/Vue for example). The method it ships with is &lt;strong&gt;blade files&lt;/strong&gt;. We've been using them so far like a simple PHP file. But they are so much more!
&lt;h4&gt;
  
  
  Directives
&lt;/h4&gt;

&lt;p&gt;Directives always start with '@'. These are the ones you'll use most often:&lt;br&gt;
** @extends('file') **&lt;br&gt;
This is used for layout files.&lt;br&gt;
** &lt;a class="mentioned-user" href="https://dev.to/include"&gt;@include&lt;/a&gt;('component',['var' =&amp;gt; "data",'var2' =&amp;gt; "data"]) **&lt;br&gt;
this is used for components you want to use multiple times that require data.&lt;br&gt;
** @yield('sectionName') &amp;amp; &lt;a class="mentioned-user" href="https://dev.to/section"&gt;@section&lt;/a&gt;('sectionName') @endsection **&lt;br&gt;
You can use @yield in the layout file to indicate where to insert a section from another file.&lt;br&gt;
The &lt;a class="mentioned-user" href="https://dev.to/section"&gt;@section&lt;/a&gt;() @endsection is used to indicate what content is suposed to go where.&lt;/p&gt;

&lt;p&gt;There are also directives that are used for logic. This means you no longer have to open and close php tags all the time! some examples include:&lt;br&gt;
@if(), &lt;a class="mentioned-user" href="https://dev.to/elseif"&gt;@elseif&lt;/a&gt;(), &lt;a class="mentioned-user" href="https://dev.to/else"&gt;@else&lt;/a&gt;, @endif&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/foreach"&gt;@foreach&lt;/a&gt;(), @endforeach&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/for"&gt;@for&lt;/a&gt;(), @endfor&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/while"&gt;@while&lt;/a&gt;(), @endwhile&lt;/p&gt;

&lt;p&gt;In forms we ALWAYS use @csrf, also optionally we can use @method() to change the way we submit (GET/POST/PUT/...)&lt;/p&gt;
&lt;h4&gt;
  
  
  Layout
&lt;/h4&gt;

&lt;p&gt;Lets make a layout file. First in the views folder create a subfolder called layout. In this folder we create a file layout.blade.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;@yield('title')&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    @yield('content')
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and lets apply this layout file to all our views like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;extends&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'layout.layout'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nf"&gt;section&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nc"&gt;Hello&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;endsection&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nf"&gt;section&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'content'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nc"&gt;Hello&lt;/span&gt; &lt;span class="n"&gt;world&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;endsection&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also add layout parts like header, footer, navigation, etc into the layout folder and &lt;a class="mentioned-user" href="https://dev.to/include"&gt;@include&lt;/a&gt;() them.&lt;/p&gt;

&lt;p&gt;Okay now lets create a blade file to show all cars. (add the necessary route and controller logic)&lt;br&gt;
web.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/cars'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;CarController&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'show'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'showCars'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CarController.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;view&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$cars&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'cars'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'cars'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$cars&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;cars.blade.php&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;extends&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'layout.layout'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nf"&gt;section&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="nc"&gt;Collection&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;endsection&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="nf"&gt;section&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'content'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nc"&gt;Cars&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nv"&gt;$cars&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;isEmpty&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;foreach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$cars&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;$car&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$car&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h3&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$car&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="nv"&gt;$car&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;color&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;endforeach&lt;/span&gt;
    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nc"&gt;Add&lt;/span&gt; &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;cars&lt;/span&gt; &lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="k"&gt;endif&lt;/span&gt;
&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;endsection&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Extra
&lt;/h3&gt;

&lt;p&gt;&lt;/p&gt;
  
  &lt;h4&gt;
  
  
  packages
&lt;/h4&gt;

&lt;p&gt;There are a ton of packages. These can add functionality to your project, or make coding easier.&lt;br&gt;
The main two types are npm and composer. Npm uses node.js and composer is php oriented.&lt;/p&gt;

&lt;p&gt;We'll start with a simple php debug bar.&lt;br&gt;
(&lt;a href="https://github.com/barryvdh/laravel-debugbar" rel="noopener noreferrer"&gt;https://github.com/barryvdh/laravel-debugbar&lt;/a&gt;)&lt;br&gt;
In your terminal use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require barryvdh/laravel-debugbar --dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(this might take a few minutes depending on the package)&lt;br&gt;
Using --dev makes sure the package is only used in development.&lt;/p&gt;

&lt;p&gt;If you refresh, there should be a Laravel icon in the bottom left, click it for the debug bar!&lt;br&gt;
&lt;em&gt;wow so easy!&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  css
&lt;/h4&gt;

&lt;p&gt;Folder:&lt;strong&gt;resources/css/app.css&lt;/strong&gt;&lt;br&gt;
In the head of the &lt;strong&gt;layout&lt;/strong&gt; file you can add the following line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@vite("resources/css/app.css")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we will need to open a second &lt;strong&gt;terminal&lt;/strong&gt; and navigate to the root of your project again. Here we want to run the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure your final css is compiled into the app.css file and your good to go!&lt;/p&gt;

&lt;h4&gt;
  
  
  slugs
&lt;/h4&gt;

&lt;p&gt;Slugs are pieces in your &lt;strong&gt;url&lt;/strong&gt; that signify a &lt;strong&gt;value&lt;/strong&gt; like an id or name. in your &lt;strong&gt;web.php&lt;/strong&gt; file you determine where the slugs are expected:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nc"&gt;Route&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'/car/{id}'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;CarController&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;class&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'showCar'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'showCar'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can use it in your &lt;strong&gt;controller&lt;/strong&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;showCar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;view&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'car'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'car'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$car&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;p&gt;If you followed all the steps you are set up and ready for a real project!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
