PHP code example of 42sol / laravel-vxe-controller

1. Go to this page and download the library: Download 42sol/laravel-vxe-controller 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/ */

    

42sol / laravel-vxe-controller example snippets


  // app\Http\Controller\DocumentController.php
  
  use App\Models\Document;
  use VxeController\Http\Controller\VxeController;
  
  class DocumentController extends VxeController {
    function model() {
      return Document::class;
    }
  }
  

    // routes/web.php
    
    Route::vxeController(\App\Http\Controllers\DocumentController::class);