mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
pdf invoice generation scaffolding
This commit is contained in:
@@ -2,6 +2,32 @@
|
||||
|
||||
use Laravel\Cashier\Cashier;
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @return bool
|
||||
*/
|
||||
function is_route($name)
|
||||
{
|
||||
return Route::currentRouteName() === $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $filepath
|
||||
* @return string
|
||||
*/
|
||||
function get_storage_path($filepath)
|
||||
{
|
||||
if (is_null($filepath)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (! Storage::exists($filepath)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return 'data:' . Storage::mimeType($filepath) . ';base64,' . base64_encode(Storage::get($filepath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get only tax for single invoice item
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user