BooksController.php 691 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Http\Controllers;
  3. use Illuminate\Http\Request;
  4. class BooksController extends EntityController
  5. {
  6. protected $essence = 'books.';
  7. protected $model = 'App\Models\Book';
  8. protected $title = 'Книги';
  9. protected $routeIndex = 'books.index';
  10. protected $routeShow = 'books.show';
  11. protected $routeCreate = 'books.create';
  12. protected $routeEdit = 'books.edit';
  13. protected $routeStore = 'books.store';
  14. protected $routeDestroy = 'books.destroy';
  15. protected $validationRules = [
  16. 'name' => 'required',
  17. ];
  18. protected $columns = [
  19. 'name' => 'text',
  20. 'year' => 'number',
  21. 'isbn' => 'textarea',
  22. ];
  23. }