vsphim / vsphim-core
Vsphim's core features - Laravel package for movie CMS
Installs: 3
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/vsphim/vsphim-core
Requires
- php: ^7.3|^8.0
- artesaos/seotools: ^v0.22.1
- ckfinder/ckfinder-laravel-package: ^3.5
- laravel/framework: ^6|^7|^8
- spatie/laravel-sitemap: ^5.8
- vsphim/crud: ^1.0.0
- vsphim/laravel-caching-model: ^1.0.0
- vsphim/permissionmanager: ^1.0.0
- vsphim/settings: ^1.0.0
Requires (Dev)
- phpunit/phpunit: ^8.0|^9.0
README
English | Tiếng Việt
English
About
Vsphim Core is a powerful Laravel package for building movie/film CMS websites. It provides a complete admin panel using Backpack CRUD, with features for managing movies, episodes, categories, actors, directors, and more.
Features
- 🎬 Complete movie management system
- 📺 Episode management with multiple streaming formats (Embed, MP4, M3U8)
- 🎭 Actor, Director, Studio, Tag management
- 📂 Category and Region taxonomy
- 🔍 SEO optimization tools
- 📊 View counter tracking (daily, weekly, monthly)
- 🎨 Theme management system
- 🔐 User and permission management
- 📱 Responsive admin panel
Requirements
- Laravel Framework: 6.x, 7.x, or 8.x
- PHP: 7.3 or higher (8.0 recommended)
- MySQL: 5.7 or higher
- Composer: Latest version
PHP Configuration
Add to your php.ini:
max_input_vars=100000
Installation
- Install the package via Composer:
composer require vsphim/vsphim-core -W
- Configure your database connection in
.envfile:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=your_database DB_USERNAME=your_username DB_PASSWORD=your_password
- Run the installation command:
php artisan vsphim:install
This will:
- Publish migrations
- Run database migrations
- Seed initial data (settings, categories, regions, menus, permissions)
- Publish assets and views
- Update your User model (
app/Models/User.php):
<?php namespace App\Models; use Vsphim\Core\Models\User as VsphimUser; use Laravel\Sanctum\HasApiTokens; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Eloquent\Factories\HasFactory; class User extends VsphimUser { use HasApiTokens, HasFactory, Notifiable; // Your custom code here }
- Create an admin user:
php artisan vsphim:user
Follow the prompts to create your first admin user.
- Remove the default welcome route in
routes/web.php:
Remove or comment out:
Route::get('/', function () { return view('welcome'); });
- Clear cache:
php artisan optimize:clear
- Access the admin panel:
Visit: http://your-domain.com/admin
Login with the credentials you created in step 5.
Update
To update to the latest version:
- Update the package:
composer update vsphim/vsphim-core -W
- Run migrations (if any):
php artisan vsphim:install
- Clear cache:
php artisan optimize:clear
- Clear PHP Opcache (if enabled on your server)
Available Commands
Generate Menu
Generate menu items from categories and regions:
php artisan vsphim:menu:generate
Change Episode Domain
Change streaming domain for episodes:
php artisan vsphim:episode:change_domain_play
Configuration
Production Environment
Update your .env file:
APP_NAME="Your App Name" APP_ENV=production APP_DEBUG=false APP_URL=https://your-domain.com
Timezone and Locale
In config/app.php:
'timezone' => 'Asia/Ho_Chi_Minh', 'locale' => 'vi',
Scheduled Tasks
To reset view counters automatically, add this to your crontab:
* * * * * cd /path/to/project && php artisan schedule:run >> /dev/null 2>&1
This will:
- Reset daily views at midnight
- Reset weekly views weekly
- Reset monthly views monthly
Resources
- Homepage: Vsphim.com
- Add-ons: Vsphim Crawler
- Themes: More themes...
Support
For issues, questions, or contributions, please visit our GitHub repository.
License
This package is open-sourced software licensed under the MIT license.
Tiếng Việt
Giới thiệu
Vsphim Core là một package Laravel mạnh mẽ để xây dựng website CMS phim. Package cung cấp admin panel hoàn chỉnh sử dụng Backpack CRUD, với các tính năng quản lý phim, tập phim, thể loại, diễn viên, đạo diễn và nhiều hơn nữa.
Tính năng
- 🎬 Hệ thống quản lý phim hoàn chỉnh
- 📺 Quản lý tập phim với nhiều định dạng streaming (Embed, MP4, M3U8)
- 🎭 Quản lý Diễn viên, Đạo diễn, Hãng phim, Thẻ
- 📂 Phân loại theo Thể loại và Quốc gia
- 🔍 Công cụ tối ưu SEO
- 📊 Theo dõi lượt xem (ngày, tuần, tháng)
- 🎨 Hệ thống quản lý giao diện
- 🔐 Quản lý người dùng và phân quyền
- 📱 Admin panel responsive
Yêu cầu hệ thống
- Laravel Framework: 6.x, 7.x, hoặc 8.x
- PHP: 7.3 trở lên (khuyến nghị 8.0)
- MySQL: 5.7 trở lên
- Composer: Phiên bản mới nhất
Cấu hình PHP
Thêm vào file php.ini:
max_input_vars=100000
Cài đặt
- Cài đặt package qua Composer:
composer require vsphim/vsphim-core -W
- Cấu hình kết nối database trong file
.env:
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=ten_database DB_USERNAME=ten_nguoi_dung DB_PASSWORD=mat_khau
- Chạy lệnh cài đặt:
php artisan vsphim:install
Lệnh này sẽ:
- Publish migrations
- Chạy database migrations
- Seed dữ liệu ban đầu (settings, categories, regions, menus, permissions)
- Publish assets và views
- Cập nhật Model User (
app/Models/User.php):
<?php namespace App\Models; use Vsphim\Core\Models\User as VsphimUser; use Laravel\Sanctum\HasApiTokens; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Eloquent\Factories\HasFactory; class User extends VsphimUser { use HasApiTokens, HasFactory, Notifiable; // Code tùy chỉnh của bạn ở đây }
- Tạo user admin:
php artisan vsphim:user
Làm theo hướng dẫn để tạo user admin đầu tiên.
- Xóa route welcome mặc định trong
routes/web.php:
Xóa hoặc comment dòng:
Route::get('/', function () { return view('welcome'); });
- Xóa cache:
php artisan optimize:clear
- Truy cập admin panel:
Truy cập: http://your-domain.com/admin
Đăng nhập bằng thông tin đã tạo ở bước 5.
Cập nhật
Để cập nhật lên phiên bản mới nhất:
- Cập nhật package:
composer update vsphim/vsphim-core -W
- Chạy migrations (nếu có):
php artisan vsphim:install
- Xóa cache:
php artisan optimize:clear
- Xóa PHP Opcache (nếu được bật trên server)
Các lệnh có sẵn
Tạo Menu
Tạo menu từ categories và regions:
php artisan vsphim:menu:generate
Đổi Domain Episode
Đổi domain streaming cho các tập phim:
php artisan vsphim:episode:change_domain_play
Cấu hình
Môi trường Production
Cập nhật file .env:
APP_NAME="Tên Ứng Dụng" APP_ENV=production APP_DEBUG=false APP_URL=https://your-domain.com
Múi giờ và Ngôn ngữ
Trong config/app.php:
'timezone' => 'Asia/Ho_Chi_Minh', 'locale' => 'vi',
Tác vụ theo lịch
Để tự động reset lượt xem, thêm vào crontab:
* * * * * cd /path/to/project && php artisan schedule:run >> /dev/null 2>&1
Tác vụ này sẽ:
- Reset lượt xem ngày vào nửa đêm
- Reset lượt xem tuần theo tuần
- Reset lượt xem tháng theo tháng
Tài nguyên
- Trang chủ: Vsphim.com
- Add-ons: Vsphim Crawler
- Giao diện: Thêm giao diện...
Hỗ trợ
Để báo lỗi, đặt câu hỏi hoặc đóng góp, vui lòng truy cập GitHub repository.
Giấy phép
Package này là phần mềm mã nguồn mở được cấp phép theo MIT license.
Changelog
See CHANGELOG.md for more information.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
Security
If you discover any security-related issues, please email vsphim@vsphim.com instead of using the issue tracker.