PHP code example of shah-newaz / redprint-ng

1. Go to this page and download the library: Download shah-newaz/redprint-ng 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/ */

    

shah-newaz / redprint-ng example snippets


return [
    /*
    |--------------------------------------------------------------------------
    | Axios Instance
    |--------------------------------------------------------------------------
    |
    | Specify the axios instance to be used in Vue components.
    | Example: 'this.$api' will generate this.$api.get() instead of axios.get()
    | Set to null to use a local axios instance with proper baseURL.
    |
    */
    'axios_instance' => null,
    
    /*
    |--------------------------------------------------------------------------
    | Vue Router Location
    |--------------------------------------------------------------------------
    |
    | Specify the location of your Vue router configuration file.
    | This should be relative to the resources directory.
    | Example: 'js/router/routes.ts' or 'js/router.js'
    |
    */
    'vue_router_location' => 'js/router/routes.ts',
];

  [
      'endpoint' => 'api/v1/categories/list',
      'labelColumn' => 'name',
      'relatedModelLower' => 'categories'
  ]
  

Route::prefix('v1')->middleware(['auth:api'])->group(function () {
    Route::get('products', [ProductController::class, 'getIndex']);
    Route::get('products/{id}', [ProductController::class, 'show']);
    Route::post('products/save', [ProductController::class, 'save']);
    Route::delete('products/{id}', [ProductController::class, 'delete']);
    // If soft deletes enabled:
    Route::delete('products/{id}/force', [ProductController::class, 'deleteFromTrash']);
});
bash
php artisan vendor:publish --tag=redprint-config
bash
php artisan redprint:crud
bash
php artisan redprint:crud
bash
php artisan redprint:vue