akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -0,0 +1,46 @@
<?php
namespace App\View\Components\Form;
use App\Abstracts\View\Component;
class Accordion extends Component
{
public $type;
public $icon;
public $open;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(
string $type, string $icon = '', bool $open = false
) {
$this->type = $type;
$this->icon = $this->getIcon($icon);
$this->open = $open;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.accordion.index');
}
protected function getIcon($icon)
{
if (! empty($icon)) {
return $icon;
}
return 'expand_more';
}
}

View File

@ -0,0 +1,131 @@
<?php
namespace App\View\Components\Form;
use App\Abstracts\View\Component;
class Buttons extends Component
{
public $groupClass = 'sm:col-span-6';
public $withoutCancel;
public $cancel;
public $cancelRoute;
public $cancelUrl;
public $cancelClass = 'px-6 py-1.5 hover:bg-gray-200 rounded-lg ltr:mr-2 rtl:ml-2';
public $cancelText;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(
$groupClass = '',
$cancel = '', $cancelRoute = '', $cancelUrl = '', $cancelClass = '', $cancelText = '', $withoutCancel = false
) {
$this->groupClass = $this->getGroupClass($groupClass);
$this->cancel = $this->getCancel($cancel, $cancelRoute, $cancelUrl);
$this->cancelClass = $this->getCancelClass($cancelClass);
$this->cancelText = $this->getCancelText($cancelText);
$this->withoutCancel = $withoutCancel;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.buttons');
}
protected function getGroupClass($groupClass)
{
if (! empty($groupClass)) {
return $groupClass;
}
return $this->groupClass;
}
protected function getCancel($cancel, $route, $url)
{
if (! empty($cancel)) {
return $cancel;
}
if (!empty($route)) {
return $this->getRouteAction($route);
}
if (!empty($url)) {
return $this->getUrlAction($url);
}
return '';
}
/**
* Get the action for a "url" option.
*
* @param array|string $options
*
* @return string
*/
protected function getUrlAction($options)
{
if (is_array($options)) {
return url($options[0], array_slice($options, 1));
}
return url($options);
}
/**
* Get the action for a "route" option.
*
* @param array|string $options
*
* @return string
*/
protected function getRouteAction($options)
{
if (is_array($options)) {
$parameters = array_slice($options, 1);
if (array_keys($options) === [0, 1]) {
$parameters = head($parameters);
}
return route($options[0], $parameters);
}
return route($options);
}
protected function getCancelClass($cancelClass)
{
if (! empty($cancelClass)) {
return $cancelClass;
}
return $this->cancelClass;
}
protected function getCancelText($cancelText)
{
if (! empty($cancelText)) {
return $cancelText;
}
return trans('general.cancel');
}
}

View File

@ -0,0 +1,37 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
use App\Models\Banking\Account as Model;
class Account extends Form
{
public $type = 'account';
public $path;
public $accounts;
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
if (empty($this->name)) {
$this->name = 'account_id';
}
$this->path = route('modals.accounts.create');
$this->accounts = Model::enabled()->orderBy('name')->pluck('name', 'id');
if (empty($this->selected) && empty($this->getParentData('model'))) {
$this->selected = setting('default.account');
}
return view('components.form.group.account');
}
}

View File

@ -0,0 +1,80 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Attachment extends Form
{
public $name = 'attachment';
public $type = 'file';
public $formGroupClass = 'sm:col-span-3';
public $custom_attributes = [
'dropzone-class' => 'form-file dropzone-column w-1/2 h-32.5',
];
public $file_types;
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
$this->setFileTypes();
$this->custom_attributes = $this->setCustomAttributes();
return view('components.form.group.attachment');
}
protected function setFileTypes()
{
$this->file_types = [];
$file_type_mimes = explode(',', config('filesystems.mimes'));
$file_types = [];
foreach ($file_type_mimes as $mime) {
$file_types[] = '.' . $mime;
}
$this->file_types = implode(',', $file_types);
}
protected function setCustomAttributes()
{
$attributes = [];
if (! empty($this->required)) {
$attributes['required'] = $this->required;
}
if (! empty($this->disabled)) {
$attributes['disabled'] = $this->disabled;
}
if (! empty($this->readonly)) {
$attributes['readonly'] = $this->readonly;
}
if (! empty($this->options)) {
$attributes['options'] = $this->options;
}
if (! empty($this->multiple)) {
$attributes['multiple'] = $this->multiple;
}
foreach ($this->custom_attributes as $key => $value) {
$attributes[$key] = $value;
}
return $attributes;
}
}

View File

@ -0,0 +1,46 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
use App\Models\Setting\Category as Model;
class Category extends Form
{
public $type = 'income';
public $path;
public $remoteAction;
public $categories;
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
$type = $this->type;
if (empty($this->name)) {
$this->name = 'category_id';
}
$this->path = route('modals.categories.create', ['type' => $this->type]);
$this->remoteAction = route('categories.index', ['search' => 'type:' . $this->type . ' enabled:1']);
$this->categories = Model::type($type)->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
if (!empty($model) && $model->category && ! $this->categories->has($model->category_id)) {
$this->categories->put($model->category->id, $model->category->name);
}
if (empty($this->selected) && (in_array($type, ['income', 'expense']))) {
$this->selected = setting('default.' . $type . '_category');
}
return view('components.form.group.category');
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Checkbox extends Form
{
public $type = 'checkbox';
/** @var string */
public $formGroupClass = 'sm:col-span-6';
public $except = [
];
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.checkbox');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Color extends Form
{
public $type = 'color';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.color');
}
}

View File

@ -0,0 +1,76 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
use App\Models\Common\Contact as Model;
class Contact extends Form
{
public $type = 'contact';
public $label;
public $view = 'components.form.group.contact';
public $path;
public $remoteAction;
public $contacts;
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
$type = $this->type;
switch ($type) {
case 'customer':
$this->prepareCustomer();
break;
case 'vendor':
$this->prepareVendor();
break;
}
return view($this->view);
}
protected function prepareCustomer()
{
if (empty($this->name)) {
$this->name = 'contact_id';
}
$this->path = route('modals.customers.create');
$this->remoteAction = route('customers.index');
$this->label = trans_choice('general.customers', 1);
$this->contacts = Model::customer()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
if (!empty($model) && $model->customer && ! $this->contacts->has($model->contact_id)) {
$this->contacts->put($model->customer->id, $model->customer->name);
}
}
protected function prepareVendor()
{
if (empty($this->name)) {
$this->name = 'contact_id';
}
$this->path = route('modals.vendors.create');
$this->remoteAction = route('vendors.index');
$this->label = trans_choice('general.vendors', 1);
$this->contacts = Model::vendor()->enabled()->orderBy('name')->take(setting('default.select_limit'))->get();
if (!empty($model) && $model->vendor && ! $this->contacts->has($model->contact_id)) {
$this->contacts->put($model->vendor->id, $model->vendor->name);
}
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Country extends Form
{
public $type = 'country';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.country');
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
use App\Models\Setting\Currency as Model;
class Currency extends Form
{
public $type = 'currency';
public $path;
public $field;
public $currencies;
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
if (empty($this->name)) {
$this->name = 'currency_code';
}
$this->path = route('modals.currencies.create');
$this->field = [
'key' => 'code',
'value' => 'name'
];
$this->currencies = Model::enabled()->orderBy('name')->pluck('name', 'code');
if (empty($this->selected) && empty($this->getParentData('model'))) {
$this->selected = setting('default.currency');
}
return view('components.form.group.currency');
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form\Group\Contact;
class Customer extends Contact
{
public $type = 'customer';
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Date extends Form
{
public $type = 'date';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.date');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class DateTime extends Form
{
public $type = 'date_time';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.date_time');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Editor extends Form
{
public $type = 'editor';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.editor');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Email extends Form
{
public $type = 'email';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.email');
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class File extends Form
{
public $type = 'file';
public $formGroupClass = 'sm:col-span-3';
public $custom_attributes = [
'dropzone-class' => 'form-file dropzone-column w-1/2 h-32.5',
];
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.file');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class InvoiceText extends Form
{
public $type = 'invoice-text';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.invoice_text');
}
}

View File

@ -0,0 +1,26 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Locale extends Form
{
public $type = 'locale';
public $name = 'locale';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
if (empty($this->selected)) {
$this->selected = setting('default.locale', config('app.locale', 'en-GB'));
}
return view('components.form.group.locale');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Money extends Form
{
public $type = 'money';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.money');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Number extends Form
{
public $type = 'number';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.number');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Password extends Form
{
public $type = 'password';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.password');
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
use App\Utilities\Modules;
class PaymentMethod extends Form
{
public $type = 'payment_method';
public $payment_methods;
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
$this->payment_methods = Modules::getPaymentMethods();
if (empty($this->selected) && empty($this->getParentData('model'))) {
$this->selected = setting('default.payment_method');
}
return view('components.form.group.payment_method');
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Radio extends Form
{
public $type = 'radio';
/** @var string */
public $formGroupClass = 'sm:col-span-6';
public $except = [
];
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.radio');
}
}

View File

@ -0,0 +1,174 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Component;
use App\Utilities\Date;
class Recurring extends Component
{
public $type;
public $frequency;
public $frequencies = [];
public $customFrequency = '';
public $customFrequencies = [];
public $limit = '';
public $limits = [];
public $startedValue = '';
public $limitCount = '';
public $limitDateValue = '';
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(
$type = '',
$frequency = '',
$frequencies = [],
$customFrequency = '',
$customFrequencies = [],
$limit = '',
$limits = [],
$startedValue = '',
$limitCount = '',
$limitDateValue = '',
) {
$this->type = $this->getType($type);
$this->frequency = $this->getFrequency($frequency);
$this->frequencies = $this->getFrequencies($frequencies);
$this->customFrequency = $this->getCustomFrequency($customFrequency);
$this->customFrequencies = $this->getCustomFrequencies($customFrequencies);
$this->limit = $this->getLimit($limit);
$this->limits = $this->getLimits($limits);
$this->startedValue = $this->getStartedValue($startedValue);
$this->limitCount = $this->getLimitCount($limitCount);
$this->limitDateValue = $this->getLimitDateValue($limitDateValue);
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.recurring');
}
protected function getType($type)
{
if (! empty($type)) {
return $type;
}
return 'invoice';
}
protected function getFrequency($frequency)
{
if (! empty($frequency)) {
return $frequency;
}
return 'monthly';
}
protected function getFrequencies($frequencies)
{
if (! empty($frequencies)) {
return $frequencies;
}
return [
'daily' => trans('recurring.daily'),
'weekly' => trans('recurring.weekly'),
'monthly' => trans('recurring.monthly'),
'yearly' => trans('recurring.yearly'),
'custom' => trans('recurring.custom'),
];
}
protected function getCustomFrequency($customFrequency)
{
if (! empty($customFrequency)) {
return $customFrequency;
}
return 'monthly';
}
protected function getCustomFrequencies($customFrequencies)
{
if (! empty($customFrequencies)) {
return $customFrequencies;
}
return [
'daily' => trans('recurring.days'),
'weekly' => trans('recurring.weeks'),
'monthly' => trans('recurring.months'),
'yearly' => trans('recurring.years'),
];
}
protected function getLimit($limit)
{
if (! empty($limit)) {
return $limit;
}
return 'never';
}
protected function getLimits($limits)
{
if (! empty($limits)) {
return $limits;
}
return [
'after' => trans('recurring.after'),
'on' => trans('recurring.on'),
'never' => trans('recurring.never'),
];
}
protected function getStartedValue($startedValue)
{
if (! empty($startedValue)) {
return $startedValue;
}
return Date::now()->toDateString();
}
protected function getLimitCount($limitCount)
{
if (! empty($limitCount)) {
return $limitCount;
}
return 0;
}
protected function getLimitDateValue($limitDateValue)
{
if (! empty($limitDateValue)) {
return $limitDateValue;
}
return Date::now()->toDateString();
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Select extends Form
{
public $type = 'select';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.select');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Sswitch extends Form
{
public $type = 'switch';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.switch');
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
use App\Models\Setting\Currency as Model;
class Tax extends Form
{
public $type = 'tax';
public $path;
public $field;
public $currencies;
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
if (empty($this->name)) {
$this->name = 'currency_code';
}
$this->path = route('modals.currencies.create');
$this->field = [
'key' => 'code',
'value' => 'name'
];
$this->currencies = Model::enabled()->orderBy('name')->pluck('name', 'code');
if (empty($this->selected)) {
$this->selected = setting('default.currency');
}
return view('components.form.group.tax');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Text extends Form
{
public $type = 'text';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.text');
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Textarea extends Form
{
public $type = 'textarea';
public $formGroupClass = 'sm:col-span-6';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.textarea');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Time extends Form
{
public $type = 'time';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.time');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form;
class Toggle extends Form
{
public $type = 'radio';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.group.toggle');
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace App\View\Components\Form\Group;
use App\Abstracts\View\Components\Form\Group\Contact;
class Vendor extends Contact
{
public $type = 'vendor';
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Checkbox extends Form
{
public $type = 'checkbox';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.checkbox');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Color extends Form
{
public $type = 'color';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.color');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Editor extends Form
{
public $type = 'editor';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.editor');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Email extends Form
{
public $type = 'email';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.email');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Ffile extends Form
{
public $type = 'file';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.file');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Hidden extends Form
{
public $type = 'hidden';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.hidden');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Input extends Form
{
public $type = 'input';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.input');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Money extends Form
{
public $type = 'money';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.money');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Number extends Form
{
public $type = 'number';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.number');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Password extends Form
{
public $type = 'password';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.password');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Radio extends Form
{
public $type = 'radio';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.radio');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Select extends Form
{
public $type = 'select';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.select');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Text extends Form
{
public $type = 'text';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.text');
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\View\Components\Form\Input;
use App\Abstracts\View\Components\Form;
class Textarea extends Form
{
public $type = 'textarea';
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.form.input.textarea');
}
}