PHPackages                             danieletulone/laravel-base-crud - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. danieletulone/laravel-base-crud

AbandonedArchivedLibrary[Framework](/categories/framework)

danieletulone/laravel-base-crud
===============================

142[1 issues](https://github.com/danieletulone/laravel-base-crud/issues)PHP

Since Aug 31Pushed 5y ago1 watchersCompare

[ Source](https://github.com/danieletulone/laravel-base-crud)[ Packagist](https://packagist.org/packages/danieletulone/laravel-base-crud)[ RSS](/packages/danieletulone-laravel-base-crud/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Base Crud - Controller
==============================

[](#laravel-base-crud---controller)

Welcome to Laravel Crud Controller repository.

What's the intent of this package?
----------------------------------

[](#whats-the-intent-of-this-package)

This package may provide basic crud operations and allows you to customize completly the controller. There are two controller:

1. **CrudController**: The main controller that returns a response of type Illuminate\\View\\View.
2. **RestCrudController**: This controller extends the main controller but change the response type: it will be a JSON.

Installation
------------

[](#installation)

Simply install with composer.

```
  composer require danieletulone/laravel-base-crud
```

Usage
=====

[](#usage)

Before use the controller, you must create all resources for a new model:

```
php artisan make:model Pizza -a
```

The **-a** flag meangin **all**: controller, model, migration, seeder and factory.

Basic Usage
-----------

[](#basic-usage)

Edit the generated controller.

1. Extends RestCrudController instead of Laravel standard Controller.
2. (optional) Set the property $model into controller with the namespace of your model.

```
