PHP code example of bepark / laravel-confirm
1. Go to this page and download the library: Download bepark/laravel-confirm 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/ */
bepark / laravel-confirm example snippets
// inside a controller
public function getDoSomething(ConfirmService $confirmService)
{
$message = ConfirmMessage::createBasic('my.pefix');
return $confirmService->confirmByForm($message, 'my.title.confirmation');
}
public function postDoSomething(ConfirmRequest $request)
{
// do something because it's confirmed
}