32 lines
534 B
PHP
32 lines
534 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Http\UploadedFile;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class FilesystemProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap the application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
UploadedFile::macro('hash',function($algo){
|
|
return hash_file($algo, $this);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register the application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
}
|