PHP code example of naugrim / laravel-sentry-tunnel
1. Go to this page and download the library: Download naugrim/laravel-sentry-tunnel 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/ */
naugrim / laravel-sentry-tunnel example snippets
// app/Services/MyMiddlewareList.php
namespace App\Services;
use Naugrim\LaravelSentryTunnel\Services\MiddlewareList;
class MyMiddlewareList extends MiddlewareList
{
public function getMiddlewareList() : array{
return array_merge(
parent::getMiddlewareList(),
[
"throttle",
]
);
}
}
// app/Providers/AppServiceProvider.php
use Illuminate\Support\ServiceProvider;
use Naugrim\LaravelSentryTunnel\Contracts\MiddlewareList;
use App\Services\MyMiddlewareList;
class AppServiceProvider extends ServiceProvider
{
public function register(){
$this->app->alias(MyMiddlewareList::class, MiddlewareList::class);
}
}