PHP code example of guardsmanpanda / larabear

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

    

guardsmanpanda / larabear example snippets


    'providers' => [
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        ...
        \GuardsmanPanda\Larabear\Infrastructure\Laravel\Provider\BearServiceProvider::class,
    ],

final class HttpKernel extends Kernel {
    // These middlewares are run during every request to your application.
    protected $middleware = [
        \GuardsmanPanda\Larabear\Infrastructure\Http\Middleware\BearInitiateMiddleware::class,
        OtherMiddleware::class,
    ];

#!/usr/bin/env php
 declare(strict_types=1);

use GuardsmanPanda\Larabear\Infrastructure\Console\Service\ConsoleOutputFilter;

define('LARAVEL_START', microtime(true));

le\Input\ArgvInput, new ConsoleOutputFilter);

$kernel->terminate($input, $status);
exit($status);

final class MyController extends Controller {
    public function myMethod(): JsonResponse {
        $data = Req::getString('data');
bash
php artisan vendor:publish --tag=bear
bash
php artisan bear