1. Go to this page and download the library: Download krisnaxyoga/krisna-crud-gen library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
krisnaxyoga / krisna-crud-gen example snippets
namespace App\CrudSchemas;
use App\Models\Product;
use Krisnaxyoga\CrudGen\Attributes\ApiResource;
use Krisnaxyoga\CrudGen\Fields\{TextField, NumberField, SelectField};
use Krisnaxyoga\CrudGen\Resource;
#[ApiResource(slug: 'products', perPage: 25)]
class ProductResource extends Resource
{
public function model(): string
{
return Product::class;
}
public function fields(): array
{
return [
TextField::make('name')->