PHP code example of touhidurabir / laravel-model-sanitize
1. Go to this page and download the library: Download touhidurabir/laravel-model-sanitize 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/ */
touhidurabir / laravel-model-sanitize example snippets
User::disableSanitization(); // disable the sanitization process
User::enableSanitization(); // enable the sanitization process if previously disabled
use Touhidurabir\ModelSanitize\Facades\ModelSanitize;
ModelSanitize::sanitize(User::class, $data); // same as User::sanitize($data)
ModelSanitize::gibberish(User::class, $data); // same as User::gibberish($data)
// Before
public function firstOrCreate(array $attributes = [], array $values = [])
// After
public function firstOrCreate(array $attributes = [], $values = [])
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.