lutfi/laravel-boilerplate
最新稳定版本:v1.0.0
Composer 安装命令:
composer create-project lutfi/laravel-boilerplate
包简介
A Laravel 10 boilerplate with Vue.js frontend and API endpoints for mobile development
README 文档
README
A modern Laravel 10 boilerplate with Vue.js 3 frontend and API endpoints for mobile development.
Features
- Laravel 10.x
- Vue 3 with Composition API
- Vue Router for SPA
- Vuex for state management
- TailwindCSS for styling
- Laravel Sanctum for API authentication
- Spatie Permission for roles and permissions
- API endpoints ready for mobile apps
- Modern authentication system
- Responsive design with TailwindCSS
- HeadlessUI and Heroicons integration
Requirements
- PHP >= 8.1
- Composer
- Node.js >= 16
- NPM or Yarn
Installation
- Create a new project:
composer create-project lutfi/laravel-boilerplate your-project-name
- Navigate to your project:
cd your-project-name
- Install PHP dependencies:
composer install
- Install NPM dependencies:
npm install
- Copy the environment file:
cp .env.example .env
- Generate application key:
php artisan key:generate
-
Configure your database in
.env -
Run migrations:
php artisan migrate
- Build frontend assets:
npm run build
Development
- Start the Laravel development server:
php artisan serve
- Start the Vite development server:
npm run dev
API Endpoints
Authentication
- POST
/api/v1/register- Register a new user - POST
/api/v1/login- Login user - POST
/api/v1/logout- Logout user - GET
/api/v1/user- Get authenticated user
Protected Routes
All protected routes require the Authorization: Bearer {token} header.
Frontend Structure
resources/js/
├── App.vue # Main app component
├── app.js # Application entry point
├── router/ # Vue Router configuration
├── store/ # Vuex store modules
├── components/ # Reusable components
└── views/ # Page components
Contributing
Feel free to submit pull requests or create issues for bugs and feature requests.
License
This project is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-03