This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function arabicToPersian($string) | |
{ | |
$characters = [ | |
'ك' => 'ک', | |
'دِ' => 'د', | |
'بِ' => 'ب', | |
'زِ' => 'ز', | |
'ذِ' => 'ذ', | |
'شِ' => 'ش', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1. Create this class in the middleware folder. | |
<?php namespace App\Http\Middleware; | |
use Closure; | |
class BeforeAutoTrimmer { | |
/** | |
* Handle an incoming request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ | |
(function() { |