PHP code example of totallyquiche / crudy

1. Go to this page and download the library: Download totallyquiche/crudy 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/ */

    

totallyquiche / crudy example snippets


$routes = [
    '/' => 'HomeController::index'
];

$routes = [
    '/' => fn() => 'Hello, World!'
);

$this->renderView('show_object', [
    'object_name' => 'Object Name';
]);

$this->renderView('view_name', [
    'message' => fn() => return 'Hello, World!',
]);

public function test_that_true_is_true() : bool
{
    return true === true;
}
sh
php index.php tests:run
sh
php index.php tests:run "App\Tests\ModelTest" "App\Tests\RouterTest"