title: How to setup inertia on my project, gives me an error when I try and load the login page
body: <p>I'm trying to setup Inertia to use in my Laravel project but it gives me errors? Where is my mistake?</p>
  
  <p>I installed Inertia with this command 
  <code>composer require inertiajs/inertia-laravel</code></p>
  
  <p>followed the instructions on the github page and added <code>@inertia</code> to my app.blade.php like this:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="{{ str_replace('_', '-', app()-&gt;getLocale()) }}"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
      &lt;!-- CSRF Token --&gt;
      &lt;meta name="csrf-token" content="{{ csrf_token() }}"&gt;
  
      &lt;!-- Scripts --&gt;
      &lt;script src="{{ asset('js/app.js') }}" defer&gt;&lt;/script&gt;
      &lt;link rel="icon" type="image/jpg" href="{{asset("/image/logo2.png")}}"&gt;
      &lt;!-- Fonts --&gt;
      &lt;link rel="dns-prefetch" href="//fonts.gstatic.com"&gt;
      &lt;link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"&gt;
  
      &lt;!-- Styles --&gt;
      &lt;link href="{{ asset('css/app.css') }}" rel="stylesheet"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  @inertia
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>in my Login Controller</p>
  
  <pre><code> public function showLoginForm()
      {
          return Inertia::render('Auth/Login');
      }
  </code></pre>
  
  <p>in my routes/web.php</p>
  
  <pre><code>Auth::routes();
  Route::get('login', 'Auth\LoginController@showLoginForm')-&gt;name('login');
  Route::post('login', 'Auth\LoginController@login');
  </code></pre>
  
  <p>This is the error I get:</p>
  
  <p>
  
  <p>the lines that is highlighted is the <code>@inertia</code> which show up as this<br>
  <code>&lt;div id="app" data-page="&lt;?php echo e(json_encode($page)); ?&gt;"&gt;&lt;/div&gt;</code></p>
  
  <p>What am i doing wrong?</p>