kashi-devdojo/calculator

My Awesome Package by kashif ali

1.0.3 2023-10-23 11:11 UTC

This package is not auto-updated.

Last update: 2024-11-05 14:02:25 UTC


README

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel Administration

Laravel Administration library provides the facility to developer to create only model. Then if developer use the LaravelAdmin Trait in that model then, he/she not need to perform the crud operations like create routes, views and controller logics. Laravel administration will provide autometically crud operations, you can check from your interface by requesting the URL app-base-url/admin.

If developer use the LaravelAdminAPI trait in model. Then laravel administration package will provide the all apis for crud, developer not need to perform create, read, list and delete apis for that model. Developer only need to get the model id and set that model ID into Postman attached collection and test the all apis after authentication.

Installation and Usage Instructions

You can install and use package by performing these instructions

Create AUTO CRUD

  1. composer require create-project laravel/laravel LaravelAdministration
  2. Migration the migrations files and seed Php artisan migrate:fresh --seed
  3. To make new Model with Migration php artisan make:model CrudTester -m
  4. Inside the DemoCRUD model add Trait in this way use LaravelAdmin
  5. You can edit migration Make Fields of DemoTester like, teser_name, tester_email, tester_image, tester_is_verified
  6. Migrate the DemoTester migration php artisan migrate
  7. You can serve php artisan serve
  8. Go to url base-url/admin
  9. Login and Go to base-app-url/admin/crud
  10. If DemoTester Model use LaravelAdmin trait and DemoTester Migration is migrated then DemoTester will be displayed in list.
  11. Click on DemoTesterModel and can test all crud operations
  12. Set the fillable fields array in DemoTester Model to show the fields, you want to display in Listing
  13. You can add new DemoTester record, update and Delete the record.

Build Your Own Schema

  1. From Schema Builder tab, You can create a Model with migration by Clicking on Add new button
  2. Add name for model and click on save button to define the schema fields for that model and Check the LaravelAdmin trait will be used or not.
  3. After defining the fields of schema for that model you can edit the migration and model file.
  4. You can edit migration and model before migrating
  5. After clicking on migrate, you will not be able to edit files.
  6. If your created model in schema builder contains LaravelAdmin trait then you can view CRUD of that model in CRUD tab

API Auto CRUD

  1. If you need all crud apis for the created model, then you need to use another trait named as *LaravelAdminAPI*
  2. Open the postman attached collection, import the collection and environment variables file on postman.
  3. You need to authenticate from login api first.
  4. {{host}}/api/admin/crud/models Model listing, from that api you can access all your models in which you use the LaravelAdminAPI trait and have been migrated.
  5. You can pick model id and set that model_id into environment variable.
  6. After setting the model_id as environment variable, you can test all crud apis for that model.
  7. For the Update data Api, you can use same Store API by passing the *id* field value.

The Laravel Administration is open-sourced software licensed under the MIT license. "# CreateReadMe"