0

I spent a lot of time to install InertiaVue and Tailwind on my new laravel 8. I have some experience with Vue.js.

I used this command to install inertia

composer create-project laravel/laravel nameofprojectt --prefer-dist

then I added this to the root template

<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <link href="{{ mix('/css/app.css') }}" rel="stylesheet" />
    <script src="{{ mix('/js/app.js') }}" defer></script>
  </head>
  <body>
    @inertia
  </body>
</html>

then I ran this command

php artisan inertia:middleware

I registered the HandleInertiaRequests middleware in my App\Http\Kernel, as the last item in my web middleware group.

\App\Http\Middleware\HandleInertiaRequests::class,

And I ran Npm install than Npm run dev

But I got always got this error

$page is undefined

Sorry if this question is to frequently about installation I am not really good on laravel. There is no clear installation how to install Laravel 8 (if yes I did not found it) with InertiaVue (does not say that need I install Vue separate or no) + Tailwind. (without jetstram).

If I use to install with jetstream everything is fine about Inertia.. But when I install without its not working for me.

1 Answer 1

2

The easiest approach is to install them with JetStream. You need to run these commands in this order:

composer require laravel/jetstream
php artisan jetstream:install inertia
npm install && npm run dev
php artisan migrate

For more information check: https://jetstream.laravel.com/1.x/installation.html

Edit:

Sign up to request clarification or add additional context in comments.

3 Comments

But I do not want use use Jetstream. I would use Orchid Admin panel without jetsream.
I done this steps but always got this error: $page is undefined
Easiest way is to install Jetstream with either Livewire or Inertia. I use Inertia. Note for Laravel 8 this install uses Vue 3. For your needs, you can just ignore the Jetstream routes for login and registration, or change them to match your admin panel. The $page variable is sent by default from the Laravel Inertia middleware. It's like a global object with stuff you typically want to send to every page- errors, flash messages, current user etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.