Laravel Installation
TailAdmin Laravel is built with Laravel and Tailwind CSS. It serves as a comprehensive starter kit for building robust admin dashboards.
Requirements
Before you begin, ensure your environment meets the following requirements:
- PHP: >= 8.2
- Composer (PHP dependency manager)
- Node.js: >= 18.x
- Database: SQLite, MySQL, or PostgreSQL
Cloning the Repository (Recommended)
The easiest way to get started is by cloning the repository directly from GitHub.
- Clone the repository:
git clone https://github.com/TailAdmin/tailadmin-laravel.git - Navigate to the project folder:
cd tailadmin-laravel
Alternative: Download
If you prefer not to use Git, you can download the dashboard template as a ZIP file. After downloading, extract the contents and navigate to the project folder in your terminal.
Installation Steps
Once you are inside the project folder, follow these steps to install dependencies and configure the environment.
1. Install PHP Dependencies
Run the following command to install the necessary PHP packages:
composer install2. Install Node Dependencies
Choose your preferred package manager to install the frontend dependencies:
npm install 3. Configure Environment
Copy the example environment file:
cp .env.example .envWindows Users
copy .env.example .envGenerate the application key:
php artisan key:generate4. Configure Database
Update your .env file with your database credentials. For example, for MySQL:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=tailadmin_db
DB_USERNAME=your_username
DB_PASSWORD=your_passwordCreate the database if it doesn’t exist:
# MySQL
mysql -u root -p -e "CREATE DATABASE tailadmin_db;"
# PostgreSQL
createdb tailadmin_db5. Run Migrations & Seeders
Set up your database tables and insert sample data:
php artisan migrate:fresh --seed6. Storage Link
Create a symbolic link to make your storage publicly accessible:
php artisan storage:linkRunning the Application
Development Mode (Recommended)
The easiest way to start development is using the built-in script:
composer run devThis single command starts:
- ✅ Laravel development server (
http://localhost:8000) - ✅ Vite dev server for hot module reloading
- ✅ Queue worker for background jobs
- ✅ Log monitoring
Manual Development Setup
Alternatively, you can run them separately in different terminal windows:
# Terminal 1
php artisan serve
# Terminal 2
npm run devBuilding for Production
When you’re ready to deploy, follow these steps to optimize your application.
1. Build and Optimize
npm run build Run these commands to cache configuration and routes for better performance:
php artisan config:cache
php artisan route:cache
php artisan view:cache
composer install --optimize-autoloader --no-dev2. Update Environment
Ensure your .env file is configured for production:
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com