helori/laravel-cms 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

helori/laravel-cms

最新稳定版本:2.0.10

Composer 安装命令:

composer require helori/laravel-cms

包简介

Configurable CMS backend for Laravel

关键字:

README 文档

README

Installation and setup

laravel new my-project cd my-project

Install Laravel Santum (API)

php artisan install:api
php artisan config:publish cors

Modify your .env file using your project name as follows :

SESSION_DOMAIN=".my-project.test"
SANCTUM_STATEFUL_DOMAINS="my-project.test"

Modify your bootstrap/app.php file :

->withMiddleware(function (Middleware $middleware) {
    $middleware->statefulApi();
})

Modify your config/cors.php as follows :

'supports_credentials' => true,

Install Laravel CMS

composer require helori/laravel-cms

# This will create migrations for medias and updated users table
php artisan vendor:publish --tag=laravel-cms-migrations

# This will publish the app\Cms folder containing your CMS config :
php artisan vendor:publish --tag=laravel-cms-config

# This will publish the project's default config files for npm dependencies, tailwind, vite and postcss
php artisan vendor:publish --tag=laravel-cms-assets-setup --force

# This will publish sources files for the admin application
php artisan vendor:publish --tag=laravel-cms-assets-admin --force

# This will publish boilerplate files for the website (be careful when using --force to overwrite !)
php artisan vendor:publish --tag=laravel-cms-assets-website --force
npm i
npm run dev

Modify your bootstrap/app.php file :

->withMiddleware(function (Middleware $middleware) {
    $middleware->redirectGuestsTo('/login');
    $middleware->redirectUsersTo('/admin');
})

Create a user :

php artisan tinker
App\Models\User::create([
    'firstname' => 'John',
    'lastname' => 'Doe',
    'name' => 'John Doe',
    'email' => 'john@doe.com',
    'password' => bcrypt('password'),
]);
exit;

统计信息

  • 总下载量: 239
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-04