PHP code example of shushushushushu / laravel-admin

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

    

shushushushushu / laravel-admin example snippets


php artisan vendor:publish --provider="shushushushushu\Admin\AdminServiceProvider"

php artisan admin:install

protected function sanitizeInput($input, $column)
{
    if ($this instanceof Field\MultipleSelect) {
        $value = Arr::get($input, $column);
        Arr::set($input, $column, array_filter($value, function($val){
            return $val !== '' && $val !== null && $val !== false;
        }));
    }
    return $input;
}

if(isset(config('filesystems.disks.' . config('filesystems.default'))['remote_url'])){
    $remoteUrl = config('filesystems.disks.' . config('filesystems.default'))['remote_url'];
    $path = rtrim($remoteUrl, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $path;
}//add domain before return path if config remote_url

return $path;

public function inputAll()
{
    return $this->inputs;
}