# Install

<figure><img src="/files/WvQczReioKnHbBLchlvp" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=MdJPtoFn2xc>" %}

to install this package you use this command

```
composer require tomatophp/tomato-admin
```

### Use Install Command

you can use the install command to build your admin panel

**NOTE**

before installing if you are not using `MacOS` please change the `Yarn` path of config on the [console-helper](/helpers/laravel-console-helpers.md) package after publishing the config file

```
php artisan tomato-admin:install
```

After Tomato installs everything run your npm

```
yarn
yarn build
```

### Allow Spatie Media Library inside your app

if you want to use media features inside your app you need to complete setup of Spatie Media Library, it's easy just publish the migration and migrate it.

```bash
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider"
```

now run your migration

```bash
php artisan migrate
```

now it's time to allow modules on your app by just adding this line to composer.json

```json
"autoload": {
    "psr-4": {
        ...
        "Modules\\" : "Modules/"
    }
},
```

### Create New User

you can create a new user to access the dashboard by using this command

```bash
php artisan tomato:user
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tomatophp.com/tomato-admin/install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
