Download the PHP package coding-partners/auto-controller without Composer
On this page you can find all versions of the php package coding-partners/auto-controller. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coding-partners/auto-controller
More information about coding-partners/auto-controller
Files in coding-partners/auto-controller
Package auto-controller
Short Description The "Auto Controller" package for Laravel allows you to quickly generate fully functional controllers for any model in your application. With a single command, the package will create a controller with all the standard CRUD (Create, Read, Update, Delete) methods, saving you significant time and effort. This enables you to focus on building the core features of your project.
License MIT
Informations about the package auto-controller
coding-partners/auto-controller
Description
coding-partners/auto-controller
is a Laravel package allows you to quickly create fully functional controllers for any model in your project. With a single command, the package will create a console with all standard CRUD methods (create, read, update, delete) as well as soft-delete methods, saving you a lot of time and effort. This enables you to focus on building the core features of your project. And let's not forget its support for uploading all types of files with high security
Installation
To install the package, use the following command via Composer:
Requirements
- PHP version 8.0 or higher is required.
Usage
To use the package: You must first set up the model and migration. For file fields:
- You must add the suffix
_img
to the image field. EX: image_img - You must add the suffix
_vid
to the video field. EX: video_vid - You must add the suffix
_aud
to the audio field, EX: audio_aud - You must add the suffix
_docs
to the document, EX: file_docs
After ensuring that you have performed all the previous steps, you can run the following command via the Artisan Console:
Workflow:
- The command will generate
FormRequest
classes for the Store and Update operations. - It will then generate an API
Resource
file for the model. - You will be prompted to choose whether to add a Service layer:
- If you answer
yes
, a Service file specific to the controller will be generated, followed by the controller. - If you answer
no
, only the controller will be generated.
- If you answer
- Finally, the necessary routes will be added to the
api.php
file.
Example with Service
Example without Service
License
This package is licensed under the MIT License.
Contributions
Contributions are welcome! If you'd like to contribute to the development of this package, you can start by opening an Issue
or submitting a Pull Request
.
Authors
- YousefSaleh1
- Ayham-Ibrahim