mirror of
https://github.com/openclassify/openclassify.git
synced 2026-04-14 11:12:09 -05:00
beta
This commit is contained in:
parent
a26e1f1221
commit
6ba704a2a0
23
.env-sail
23
.env-sail
@ -1,23 +0,0 @@
|
|||||||
APP_NAME=oc
|
|
||||||
APP_ENV=production
|
|
||||||
INSTALLED="false"
|
|
||||||
APP_URL_TYPE="HTTP_X_FORWARDED_HOST"
|
|
||||||
APP_KEY=DYKEBxfEHK1PP4mUbP3gWPtsPZgXh0qX
|
|
||||||
APP_DEBUG=true
|
|
||||||
DEBUG_BAR=true
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
#DB_HOST=mysql
|
|
||||||
DB_HOST=host.docker.internal
|
|
||||||
DB_DATABASE=oc
|
|
||||||
DB_USERNAME=oc
|
|
||||||
DB_PASSWORD=oc
|
|
||||||
APPLICATION_NAME=Default
|
|
||||||
APPLICATION_REFERENCE=default
|
|
||||||
ADMIN_USERNAME=admin
|
|
||||||
ADMIN_EMAIL=admin@example.com
|
|
||||||
ADMIN_PASSWORD=admin
|
|
||||||
APP_LOCALE=en
|
|
||||||
APP_TIMEZONE=UTC
|
|
||||||
REDIS_CLIENT=phpredis
|
|
||||||
REDIS_HOST=redis
|
|
||||||
REDIS_PORT=6379
|
|
||||||
16
.env.example
16
.env.example
@ -1,16 +0,0 @@
|
|||||||
APP_ENV=local
|
|
||||||
INSTALLED=false
|
|
||||||
APP_KEY=spNWIbUUSkRICcUwBGOaDzgwWsLjqUVq
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
DB_HOST=localhost
|
|
||||||
DB_DATABASE=forge
|
|
||||||
DB_USERNAME=forge
|
|
||||||
DB_PASSWORD=forge
|
|
||||||
APPLICATION_NAME=Default
|
|
||||||
APPLICATION_REFERENCE=default
|
|
||||||
ADMIN_USERNAME=$adminUserName
|
|
||||||
ADMIN_EMAIL=admin@example.com
|
|
||||||
ADMIN_PASSWORD=admin123
|
|
||||||
LOCALE=en
|
|
||||||
AUTO_TOKEN=spNWITUUSkRICcUwBGOaDzGwWsLqUVqX
|
|
||||||
APP_TIMEZONE=UTC
|
|
||||||
70
.env_demo
70
.env_demo
@ -1,70 +0,0 @@
|
|||||||
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
DB_HOST=localhost
|
|
||||||
DB_PORT=3307
|
|
||||||
DB_DATABASE=oc
|
|
||||||
DB_USERNAME=root
|
|
||||||
DB_PASSWORD=""
|
|
||||||
|
|
||||||
APP_NAME="OpenClassify"
|
|
||||||
FORCE_SSL=0
|
|
||||||
APP_TIMEZONE="UTC"
|
|
||||||
DATE_FORMAT="j F, Y"
|
|
||||||
TIME_FORMAT="H:i"
|
|
||||||
UNIT_SYSTEM="imperial"
|
|
||||||
STANDARD_THEME="visiosoft.theme.default"
|
|
||||||
ADMIN_THEME="visiosoft.theme.defaultadmin"
|
|
||||||
RESULTS_PER_PAGE=15
|
|
||||||
DEFAULT_LOCALE="en"
|
|
||||||
ENABLED_LOCALES='a:1:{i:0;s:2:"en";}'
|
|
||||||
MAINTENANCE_MODE=0
|
|
||||||
MAINTENANCE_AUTH=0
|
|
||||||
FROM_ADDRESS="info@openclassify.com"
|
|
||||||
FROM_NAME="OpenClassify"
|
|
||||||
|
|
||||||
MAIL_DRIVER="smtp"
|
|
||||||
MAIL_HOST=smtp.mailtrap.io
|
|
||||||
MAIL_PORT=2525
|
|
||||||
MAIL_USERNAME="029f2d0c9099d9"
|
|
||||||
MAIL_PASSWORD="8252f6d1c2ca42"
|
|
||||||
|
|
||||||
HTTP_CACHE=0
|
|
||||||
HTTP_CACHE_TTL=3600
|
|
||||||
HTTP_CACHE_ALLOW_BOTS=0
|
|
||||||
HTTP_CACHE_EXCLUDED="NULL"
|
|
||||||
HTTP_CACHE_RULES="NULL"
|
|
||||||
DB_CACHE=0
|
|
||||||
DB_CACHE_TTL=3600
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ADV_COUNTRY=212
|
|
||||||
ADV_LOGO="NULL"
|
|
||||||
ADV_SITE_ADDRESS="visiosoft.com.tr"
|
|
||||||
ADV_AUTO_APPROVE=1
|
|
||||||
ADV_PUBLISH_TIME=10
|
|
||||||
ADV_GET=0
|
|
||||||
ADV_LIMIT=15
|
|
||||||
ADV_PHONE="212 555 55 55"
|
|
||||||
ADV_ADDRESS="Basaksehir Istanbul"
|
|
||||||
ADV_CITY=34
|
|
||||||
ADV_DISTRICT=1091
|
|
||||||
ADV_MAIL="support"
|
|
||||||
ADV_MAP_KEY="AIzaSyCAGc0z8kg9rKGVy2FizFKoz0FoWWWzoGQ"
|
|
||||||
ADV_MAP_LONG="28.74558607285155"
|
|
||||||
ADV_MAP_LAT="40.97817786299617"
|
|
||||||
ADV_CURRENCIES='a:1:{i:0;s:1:"0";}'
|
|
||||||
ADV_CURRENCY_CONVERT_API_KEY="1eea72940f3868c77420"
|
|
||||||
ADV_CURRENCY="USD"
|
|
||||||
ADV_TWITTER="/twitter.com/visiosoft"
|
|
||||||
ADV_FACEBOOK="/facebook.com/visiosoft"
|
|
||||||
ADV_YOUTUBE="/youtube.com/visiosoft"
|
|
||||||
ADV_GOOGLE="/plus.google.com/visiosoft"
|
|
||||||
ADV_WATERMARK_TYPE="text"
|
|
||||||
ADV_WATERMARK_TEXT="openclassify.com"
|
|
||||||
ADV_WATERMARK_POSITION="top-right"
|
|
||||||
ADV_WATERMARK_OPACITY=80
|
|
||||||
ADV_ENABLED_CURRENCIES='a:1:{i:0;s:3:"USD";}'
|
|
||||||
|
|
||||||
|
|
||||||
ENABLE_SENTRY_LARAVEL=true
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
.coverage
|
|
||||||
composer.lock
|
|
||||||
npm-debug.log
|
|
||||||
mix-manifest.json
|
|
||||||
package-lock.json
|
|
||||||
/bin
|
|
||||||
/build
|
|
||||||
/vendor
|
|
||||||
/coverage
|
|
||||||
/node_modules
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "visiosoft/global_helper-extension",
|
|
||||||
"type": "streams-addon",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Visiosoft\\GlobalHelperExtension\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"src/Support/_helpers.php"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
|
||||||
|
|
||||||
class VisiosoftExtensionHelperCreateHelperFields extends Migration
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon fields.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $fields = [
|
|
||||||
'name' => 'anomaly.field_type.text',
|
|
||||||
'slug' => [
|
|
||||||
'type' => 'anomaly.field_type.slug',
|
|
||||||
'config' => [
|
|
||||||
'slugify' => 'name',
|
|
||||||
'type' => '_'
|
|
||||||
],
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Helper',
|
|
||||||
'name' => 'Helper Extension',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [];
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [];
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [];
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
<?php namespace Visiosoft\GlobalHelperExtension;
|
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Addon\Extension\Extension;
|
|
||||||
|
|
||||||
class GlobalHelperExtension extends Extension
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
<?php namespace Visiosoft\GlobalHelperExtension;
|
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
|
||||||
|
|
||||||
class GlobalHelperExtensionPlugin extends Plugin{
|
|
||||||
|
|
||||||
public function getFunctions(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
new \Twig_SimpleFunction(
|
|
||||||
'is_module_enabled',
|
|
||||||
function ($slug) {
|
|
||||||
return is_module_installed($slug);
|
|
||||||
}
|
|
||||||
),
|
|
||||||
new \Twig_SimpleFunction(
|
|
||||||
'is_extension_enabled',
|
|
||||||
function ($slug) {
|
|
||||||
return is_extension_installed($slug);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,165 +0,0 @@
|
|||||||
<?php namespace Visiosoft\GlobalHelperExtension;
|
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Addon\AddonServiceProvider;
|
|
||||||
use Illuminate\Routing\Router;
|
|
||||||
|
|
||||||
class GlobalHelperExtensionServiceProvider extends AddonServiceProvider
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Additional addon plugins.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $plugins = [
|
|
||||||
GlobalHelperExtensionPlugin::class
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon Artisan commands.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $commands = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon's scheduled commands.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $schedules = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon API routes.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $api = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon routes.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $routes = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon middleware.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $middleware = [
|
|
||||||
//Visiosoft\HelperExtension\Http\Middleware\ExampleMiddleware::class
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Addon group middleware.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $groupMiddleware = [
|
|
||||||
//'web' => [
|
|
||||||
// Visiosoft\HelperExtension\Http\Middleware\ExampleMiddleware::class,
|
|
||||||
//],
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Addon route middleware.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $routeMiddleware = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon event listeners.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $listeners = [
|
|
||||||
//Visiosoft\HelperExtension\Event\ExampleEvent::class => [
|
|
||||||
// Visiosoft\HelperExtension\Listener\ExampleListener::class,
|
|
||||||
//],
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon alias bindings.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $aliases = [
|
|
||||||
//'Example' => Visiosoft\HelperExtension\Example::class
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon class bindings.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $bindings = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon singleton bindings.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $singletons = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Additional service providers.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $providers = [
|
|
||||||
//\ExamplePackage\Provider\ExampleProvider::class
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon view overrides.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $overrides = [
|
|
||||||
//'streams::errors/404' => 'module::errors/404',
|
|
||||||
//'streams::errors/500' => 'module::errors/500',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The addon mobile-only view overrides.
|
|
||||||
*
|
|
||||||
* @type array|null
|
|
||||||
*/
|
|
||||||
protected $mobile = [
|
|
||||||
//'streams::errors/404' => 'module::mobile/errors/404',
|
|
||||||
//'streams::errors/500' => 'module::mobile/errors/500',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register the addon.
|
|
||||||
*/
|
|
||||||
public function register()
|
|
||||||
{
|
|
||||||
// Run extra pre-boot registration logic here.
|
|
||||||
// Use method injection or commands to bring in services.
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Boot the addon.
|
|
||||||
*/
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
// Run extra post-boot registration logic here.
|
|
||||||
// Use method injection or commands to bring in services.
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map additional addon routes.
|
|
||||||
*
|
|
||||||
* @param Router $router
|
|
||||||
*/
|
|
||||||
public function map(Router $router)
|
|
||||||
{
|
|
||||||
// Register dynamic routes here for example.
|
|
||||||
// Use method injection or commands to bring in services.
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
|
|
||||||
namespace Visiosoft\GlobalHelperExtension\Interfaces;
|
|
||||||
|
|
||||||
interface BaseTypeInterface
|
|
||||||
{
|
|
||||||
public function toArray(): ?array;
|
|
||||||
}
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Visiosoft\GlobalHelperExtension\Response;
|
|
||||||
abstract class BaseResponse
|
|
||||||
{
|
|
||||||
protected bool $success;
|
|
||||||
protected ?string $message;
|
|
||||||
protected ?array $data;
|
|
||||||
private ?string $errorCode;
|
|
||||||
|
|
||||||
public function __construct(bool $success, ?string $message = null, ?array $data = null, ?string $errorCode = null)
|
|
||||||
{
|
|
||||||
$this->success = $success;
|
|
||||||
$this->message = $message;
|
|
||||||
$this->data = $data;
|
|
||||||
$this->errorCode = $errorCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function isSuccess(): bool
|
|
||||||
{
|
|
||||||
return $this->success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMessage(): ?string
|
|
||||||
{
|
|
||||||
return $this->message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getData(): ?array
|
|
||||||
{
|
|
||||||
return $this->data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getErrorCode(): ?string
|
|
||||||
{
|
|
||||||
return $this->errorCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setSuccess(bool $success): void
|
|
||||||
{
|
|
||||||
$this->success = $success;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setMessage(string $message): void
|
|
||||||
{
|
|
||||||
$this->message = $message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setData(array $data): void
|
|
||||||
{
|
|
||||||
$this->data = $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setErrorCode(string $errorCode): void
|
|
||||||
{
|
|
||||||
$this->errorCode = $errorCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Visiosoft\GlobalHelperExtension\Response;
|
|
||||||
|
|
||||||
class Response
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Simple Formatted Response Class
|
|
||||||
*/
|
|
||||||
|
|
||||||
protected bool $success = true;
|
|
||||||
protected array $data = [];
|
|
||||||
protected string $message = "";
|
|
||||||
protected bool $isJson;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param bool $isJson
|
|
||||||
*/
|
|
||||||
public function __construct(bool $isJson = true)
|
|
||||||
{
|
|
||||||
$this->isJson = $isJson;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param bool $success
|
|
||||||
*/
|
|
||||||
public function setSuccess(bool $success = true)
|
|
||||||
{
|
|
||||||
$this->success = $success;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $data
|
|
||||||
*/
|
|
||||||
public function setData(array $data)
|
|
||||||
{
|
|
||||||
$this->data = $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getData(): array
|
|
||||||
{
|
|
||||||
return $this->data;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $message
|
|
||||||
*/
|
|
||||||
public function setMessage(string $message)
|
|
||||||
{
|
|
||||||
$this->message = $message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getMessage(): string
|
|
||||||
{
|
|
||||||
return $this->message;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array|object
|
|
||||||
*/
|
|
||||||
public function getResponse()
|
|
||||||
{
|
|
||||||
$response = ['success' => $this->success];
|
|
||||||
|
|
||||||
if (!empty($this->message)) {
|
|
||||||
$response['message'] = $this->message;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($this->data)) {
|
|
||||||
$response['data'] = $this->data;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->isJson) {
|
|
||||||
$response = (object)$response;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $response;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
<?php namespace Visiosoft\GlobalHelperExtension\Support\Command;
|
|
||||||
|
|
||||||
|
|
||||||
class CheckInstalled
|
|
||||||
{
|
|
||||||
protected $slug;
|
|
||||||
protected $type;
|
|
||||||
|
|
||||||
public function __construct($slug, $type)
|
|
||||||
{
|
|
||||||
$this->slug = $slug;
|
|
||||||
$this->type = $type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handle()
|
|
||||||
{
|
|
||||||
if ($this->type === 'module'){
|
|
||||||
if ($addon = app('module.collection')->get($this->slug)) {
|
|
||||||
return $addon->installed;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}elseif ($this->type === 'extension'){
|
|
||||||
if ($addon = app('extension.collection')->get($this->slug)) {
|
|
||||||
return $addon->installed;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Visiosoft\GlobalHelperExtension\Support\Command\CheckInstalled;
|
|
||||||
|
|
||||||
if (!function_exists('is_module_installed'))
|
|
||||||
{
|
|
||||||
function is_module_installed($slug, $type='module') {
|
|
||||||
return dispatch_sync(new CheckInstalled($slug, $type));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!function_exists('is_extension_installed'))
|
|
||||||
{
|
|
||||||
function is_extension_installed($slug, $type='extension') {
|
|
||||||
return dispatch_sync(new CheckInstalled($slug, $type));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
<?php namespace Visiosoft\GlobalHelperExtension\Traits;
|
|
||||||
|
|
||||||
use Illuminate\Http\RedirectResponse;
|
|
||||||
|
|
||||||
trait RedirectBackTrait
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @param bool $withInput
|
|
||||||
* @return RedirectResponse
|
|
||||||
*/
|
|
||||||
public function redirectBack(bool $withInput = true): RedirectResponse
|
|
||||||
{
|
|
||||||
$redirect = $this->redirect->back();
|
|
||||||
if ($withInput) {
|
|
||||||
$redirect->withInput(request()->all());
|
|
||||||
}
|
|
||||||
|
|
||||||
return $redirect;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $message
|
|
||||||
* @param bool $withInput
|
|
||||||
* @return RedirectResponse
|
|
||||||
*/
|
|
||||||
public function redirectBackWithSuccess($message, bool $withInput = false): RedirectResponse
|
|
||||||
{
|
|
||||||
return $this->redirectBack($withInput)->with('success', ['message' => $message]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $message
|
|
||||||
* @param bool $withInput
|
|
||||||
* @return RedirectResponse
|
|
||||||
*/
|
|
||||||
public function redirectBackWithError($message, bool $withInput = true): RedirectResponse
|
|
||||||
{
|
|
||||||
return $this->redirectBack($withInput)->with('error', ['message' => $message]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function redirectTo(string $redirectPath)
|
|
||||||
{
|
|
||||||
return $this->redirect->to($redirectPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,71 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Visiosoft\GlobalHelperExtension\Traits;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
|
||||||
|
|
||||||
trait ReturnResponseTrait
|
|
||||||
{
|
|
||||||
protected array $output = [
|
|
||||||
'success' => true,
|
|
||||||
'data' => [],
|
|
||||||
'message' => '',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $data
|
|
||||||
* @param bool $success
|
|
||||||
* @param string $message
|
|
||||||
* @param int $statusCode
|
|
||||||
* @return JsonResponse
|
|
||||||
*/
|
|
||||||
public function sendResponse($data = [], string $message = '', bool $success = true, int $statusCode = 200): JsonResponse
|
|
||||||
{
|
|
||||||
if (request()->method() == 'POST') {
|
|
||||||
$statusCode = 201;
|
|
||||||
}
|
|
||||||
$this->output['success'] = $success;
|
|
||||||
$this->output['data'] = $data;
|
|
||||||
$this->output['message'] = $message;
|
|
||||||
return $this->setResponse($this->output, $statusCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $errors
|
|
||||||
* @param string $message
|
|
||||||
* @param int $statusCode
|
|
||||||
* @return JsonResponse
|
|
||||||
*/
|
|
||||||
public function sendError($errors = [], string $message = '', int $statusCode = 404): JsonResponse
|
|
||||||
{
|
|
||||||
$this->output['success'] = false;
|
|
||||||
$this->output['errors'] = $errors;
|
|
||||||
$this->output['message'] = $message;
|
|
||||||
return $this->setResponse($this->output, $statusCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param $e
|
|
||||||
* @param $statusCode
|
|
||||||
* @return JsonResponse
|
|
||||||
*/
|
|
||||||
public function sendExceptionError($e, $statusCode = 500): JsonResponse
|
|
||||||
{
|
|
||||||
$message = 'internal error';
|
|
||||||
if (config('app.debug')) {
|
|
||||||
$message = $e->getMessage() . ' LINE:' . $e->getLine();
|
|
||||||
}
|
|
||||||
$this->output['success'] = false;
|
|
||||||
$this->output['message'] = $message;
|
|
||||||
return $this->setResponse($this->output, $statusCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param array $data
|
|
||||||
* @param int $code
|
|
||||||
* @return JsonResponse
|
|
||||||
*/
|
|
||||||
private function setResponse(array $data = [], int $code = 200): JsonResponse
|
|
||||||
{
|
|
||||||
return response()->json($data, $code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
<?php
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Visiosoft\GlobalHelperExtension\Types;
|
|
||||||
|
|
||||||
use ReflectionClass;
|
|
||||||
use Visiosoft\GlobalHelperExtension\Interfaces\BaseTypeInterface;
|
|
||||||
|
|
||||||
abstract class BaseType implements BaseTypeInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
public function setIfNotEmpty($setter, $value)
|
|
||||||
{
|
|
||||||
if (!empty($value)) {
|
|
||||||
$setter = "set" . ucfirst(strtolower($setter));
|
|
||||||
$this->$setter($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function toArray(): array
|
|
||||||
{
|
|
||||||
$result = [];
|
|
||||||
|
|
||||||
$reflectionClass = new ReflectionClass($this);
|
|
||||||
$properties = $reflectionClass->getProperties();
|
|
||||||
|
|
||||||
foreach ($properties as $property) {
|
|
||||||
$property->setAccessible(true);
|
|
||||||
$propertyName = $property->getName();
|
|
||||||
$propertyValue = $property->getValue($this);
|
|
||||||
|
|
||||||
if (!empty($propertyValue)) {
|
|
||||||
if (is_array($propertyValue) && count($propertyValue) > 0 && is_object($propertyValue[0])) {
|
|
||||||
foreach ($propertyValue as $entry) {
|
|
||||||
$result[] = $entry->toArray();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$result[$propertyName] = $propertyValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "visiosoft/input_file-field_type",
|
|
||||||
"type": "streams-addon",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Visiosoft, LTD.",
|
|
||||||
"email": "support@visiosoft.com.tr",
|
|
||||||
"homepage": "https://visiosoft.com.tr/",
|
|
||||||
"role": "Owner"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Vedat Akdoğan",
|
|
||||||
"email": "vedat@visiosoft.com.tr",
|
|
||||||
"role": "Developer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Visiosoft\\InputFileFieldType\\": "src/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Invoerlêer',
|
|
||||||
'name' => 'Invoerlêer Veldtipe',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Kies lêer',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'ملف الإدخال',
|
|
||||||
'name' => 'نوع حقل ملف الإدخال',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'اختر ملف',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Fayl daxil edin',
|
|
||||||
'name' => 'Fayl sahəsi növü daxil edin',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Faylı seçin',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Входен файл',
|
|
||||||
'name' => 'Тип поле на входния файл',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Изберете файл',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'ইনপুট ফাইল',
|
|
||||||
'name' => 'ইনপুট ফাইলের ক্ষেত্রের প্রকার',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'ফাইল পছন্দ কর',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Fitxer d’entrada',
|
|
||||||
'name' => 'Tipus de camp d\'arxiu d\'entrada',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Trieu l\'arxiu',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Vložte soubor',
|
|
||||||
'name' => 'Typ pole vstupního souboru',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Vyberte soubor',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Indtastningsfil',
|
|
||||||
'name' => 'Indtastningsfelt felttype',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Vælg fil',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Eingabedatei',
|
|
||||||
'name' => 'Eingabedateifeldtyp',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Datei wählen',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Αρχείο εισαγωγής',
|
|
||||||
'name' => 'Τύπος πεδίου αρχείου εισαγωγής',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Επιλέξτε το αρχείο',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Input File',
|
|
||||||
'name' => 'Input File Field Type',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Choose File',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Fichero de entrada',
|
|
||||||
'name' => 'Tipo de campo de archivo de entrada',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Elija el archivo',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'فایل ورودی',
|
|
||||||
'name' => 'نوع فیلد پرونده ورودی',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'انتخاب فایل',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Syötetiedosto',
|
|
||||||
'name' => 'Syötetiedoston kenttätyyppi',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Valitse tiedosto',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Fichier d\'entrée',
|
|
||||||
'name' => 'Type de champ de fichier d\'entrée',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Choisir le fichier',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'קובץ קלט',
|
|
||||||
'name' => 'סוג שדה של קובץ קלט',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'בחר קובץ',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'इनपुट फ़ाइल',
|
|
||||||
'name' => 'इनपुट फ़ाइल फ़ील्ड प्रकार',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'फ़ाइल का चयन',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Bemeneti fájl',
|
|
||||||
'name' => 'Bemeneti fájl mező típusa',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Válassz fájlt',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'File masukan',
|
|
||||||
'name' => 'Jenis Kolom Input File',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Pilih File',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'File di input',
|
|
||||||
'name' => 'Tipo di campo file di input',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Scegli il file',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => '入力ファイル',
|
|
||||||
'name' => '入力ファイルのフィールドタイプ',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'ファイルを選ぶ',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => '입력 파일',
|
|
||||||
'name' => '입력 파일 필드 유형',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => '파일을 선택',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Pelê Input',
|
|
||||||
'name' => 'Tîpa Qada Pelê ya Têkilî',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Pelê hilbijêrin',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Invoer bestand',
|
|
||||||
'name' => 'Invoerbestand Veldtype',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Kies bestand',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Inndatafil',
|
|
||||||
'name' => 'Inndatafeltfelt',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Velg Fil',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Plik wejściowy',
|
|
||||||
'name' => 'Typ pola pliku wejściowego',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Wybierz plik',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Arquivo de entrada',
|
|
||||||
'name' => 'Tipo de campo de arquivo de entrada',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Escolher arquivo',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Fișier de intrare',
|
|
||||||
'name' => 'Tipul de câmp de intrare a fișierului',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Alege fișierul',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Входной файл',
|
|
||||||
'name' => 'Тип поля входного файла',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Выбрать файл',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Skedari i hyrjes',
|
|
||||||
'name' => 'Lloji i fushës së skedarit të hyrjes',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Zgjidhni Skedarin',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Ulazna datoteka',
|
|
||||||
'name' => 'Tip polja ulazne datoteke',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Izaberi datoteku',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Indatafil',
|
|
||||||
'name' => 'Filtyp för inmatningsfil',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Välj FIL',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Giriş dosyası',
|
|
||||||
'name' => 'Giriş Dosyası Alan Türü',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Dosya seçin',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Вхідний файл',
|
|
||||||
'name' => 'Тип поля вхідного файлу',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Виберіть файл',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'ان پٹ فائل',
|
|
||||||
'name' => 'ان پٹ فائل فیلڈ کی قسم',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'فائل منتخب کریں',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => 'Tệp đầu vào',
|
|
||||||
'name' => 'Loại trường tệp đầu vào',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => 'Chọn tập tin',
|
|
||||||
];
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'title' => '输入文件',
|
|
||||||
'name' => '输入文件字段类型',
|
|
||||||
'description' => ''
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'choose_file' => '选择文件',
|
|
||||||
];
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<div class="form-group pb-1">
|
|
||||||
<input type="file" id="input_file" name="{{ field_type.getInputName() }}" {{ html_attributes(field_type.attributes) }} {{ field_type.disabled ? 'disabled' }} {{ field_type.required ? 'required' }} {{ field_type.readonly ? 'readonly' }} accept="image/png">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{#Todo:: Check Accept Input File Field Type#}
|
|
||||||
@ -1,8 +0,0 @@
|
|||||||
<?php namespace Visiosoft\InputFileFieldType;
|
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Addon\FieldType\FieldType;
|
|
||||||
|
|
||||||
class InputFileFieldType extends FieldType
|
|
||||||
{
|
|
||||||
protected $inputView = 'visiosoft.field_type.input_file::input';
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
<?php namespace Visiosoft\InputFileFieldType;
|
|
||||||
|
|
||||||
use Anomaly\Streams\Platform\Addon\FieldType\FieldTypePresenter;
|
|
||||||
use Collective\Html\HtmlBuilder;
|
|
||||||
|
|
||||||
|
|
||||||
class InputFileFieldTypePresenter extends FieldTypePresenter
|
|
||||||
{
|
|
||||||
|
|
||||||
protected $html;
|
|
||||||
|
|
||||||
public function __construct(HtmlBuilder $html, $object)
|
|
||||||
{
|
|
||||||
$this->html = $html;
|
|
||||||
|
|
||||||
parent::__construct($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user