bpocallaghan/testimonials

为您的laravel admin项目添加Testimonials - https://github.com/bpocallaghan/laravel-admin-starter

1.0.0 2019-05-21 06:24 UTC

This package is auto-updated.

Last update: 2024-09-21 20:33:25 UTC


README

这将向您的laravel项目添加Testimonials。

安装

更新项目中的 composer.json 文件。

composer require bpocallaghan/testimonials

使用

routes/vendor.php 文件中注册路由。

  • 网站
Route::resource('testimonials', 'Testimonials\Controllers\Website\TestimonialsController');
  • 管理员
Route::group(['prefix' => 'general', 'namespace' => 'Testimonials\Controllers\Admin'], function () {
    Route::get('testimonials/order', 'OrderController@index');
    Route::post('testimonials/order', 'OrderController@updateOrder');
    Route::resource('testimonials', 'TestimonialsController');
});

命令

php artisan testimonials:publish

这将复制 database/seedsdatabase/migrations 到您的应用程序。请记住在 DatabaseSeeder.php 中添加 $this->call(TestimonialsTableSeeder::class);

php artisan testimonials:publish --files=all

这将复制 模型、视图和控制器 到相应的目录。请注意,在执行上述命令时,您需要更新您的 routes

  • 网站
Route::get('/testimonials', 'TestimonialsController@index');
  • 管理员
Route::group(['namespace' => 'Testimonials'], function () {
    Route::get('testimonials/order', 'OrderController@index');
    Route::post('testimonials/order', 'OrderController@updateOrder');
    Route::resource('testimonials', 'TestimonialsController');
});

演示

该软件包正在 Laravel Admin Starter 项目中使用。

待办事项

  • 添加导航生成器信息(用于创建导航/urls)