public function getConnector(Request $request) { $own_directory = $this->makeDirectory(); $uploadAllow = ['image/jpeg', 'image/png', 'image/gif', 'image/vnd.adobe.photoshop', 'application/pdf', 'application/x-shockwave-flash', 'video/x-flv', 'video/h264', 'video/webm', 'audio/aac', 'audio/mp4', 'audio/mpeg', 'audio/ogg', 'audio/webm', 'image/vnd.djvu', 'application/vnd.oasis.opendocument.chart', 'application/vnd.oasis.opendocument.formula', 'application/vnd.oasis.opendocument.graphics', 'application/vnd.oasis.opendocument.image', 'application/vnd.oasis.opendocument.presentation', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.text', 'application/epub+zip', 'application/vnd.ms-htmlhelp', 'application/x-mobipocket-ebook', 'application/onenote', 'application/vnd.ms-project', 'application/x-mspublisher', 'application/vnd.visio', 'application/x-mswrite', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'application/vnd.sun.xml.calc', 'application/vnd.sun.xml.draw', 'application/vnd.sun.xml.impress', 'application/vnd.sun.xml.math', 'text/plain', 'application/zip', 'application/x-rar-compressed']; $customType = $request->input('custom_type', ''); $onlyMimes = $this->onlyMimes($customType); if (!empty($onlyMimes)) { $uploadAllow = $onlyMimes; } $connector = new Connector(new \elFinder(['roots' => [['driver' => 'LocalFileSystem', 'path' => public_path('files/' . $own_directory), 'alias' => 'Online drive: \\Home', 'URL' => asset('files/' . $own_directory . '/'), 'accessControl' => config('elfinder.access'), 'dateFormat' => DateTimeHelper::shortDateFormat(), 'timeFormat' => DateTimeHelper::shortTimeFormat(), 'uploadAllow' => $uploadAllow, 'uploadDeny' => ['all'], 'uploadOrder' => ['deny', 'allow']]]])); $connector->run(); return $connector->getResponse(); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { add_filter('main_menu', new CallableObject(function (Menu $menu) { $menu->addItem(new MenuItem('#social-sharing', trans('label.social_sharing'), 'li', null, 'page-scroll')); $menu->addItem(new MenuItem('#facebook-comment', trans('label.facebook_comment'), 'li', null, 'page-scroll')); $menu->addItem(new MenuItem('#example-widgets', trans('label.example_widget'), 'li', null, 'page-scroll')); $menu->addItem(new MenuItem('#my-settings', trans('pages.my_settings_title'), 'li', null, 'page-scroll')); return $menu; })); $settings = settings(); $datetimeHelper = DateTimeHelper::getInstance(); $localeCode = $settings->getLocale(); $locale = allLocale($localeCode); $countryCode = $settings->getCountry(); $country = allCountry($countryCode); return view($this->themePage('home'), ['country' => $countryCode . ' - ' . $country['name'] . ' (+' . $country['calling_code'] . ')', 'locale' => $localeCode . '_' . $locale['country_code'] . ' - ' . $locale['name'] . ' (' . $locale['native'] . ')', 'timezone' => $settings->getTimezone() . ' (' . $datetimeHelper->getCurrentTimeZone() . ')', 'price' => toFormattedNumber(22270) . ' VND = ' . toFormattedCurrency(22270, 'VND'), 'long_datetime' => $datetimeHelper->compound(DateTimeHelper::LONG_DATE_FUNCTION, ' ', DateTimeHelper::LONG_TIME_FUNCTION), 'short_datetime' => $datetimeHelper->compound()]); }
public function getMemberSinceAttribute() { return DateTimeHelper::getInstance()->shortDate($this->attributes['created_at']); }
/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit(Request $request, $id) { $user = User::findOrFail($id); $this->theme->title([trans('pages.admin_users_title'), trans('form.action_edit')]); $this->theme->description(trans('pages.admin_users_desc')); return $this->_edit(['user' => $user, 'user_roles' => $user->roles, 'roles' => Role::haveStatuses([Role::STATUS_NORMAL])->get(), 'date_js_format' => DateTimeHelper::shortDatePickerJsFormat()]); }
function shortTimeFormatsAsOptions($selected) { return DateTimeHelper::getShortTimeFormatsAsOptions($selected); }
public function index(Request $request) { $this->theme->title(trans('pages.my_documents_title')); $this->theme->description(trans('pages.my_documents_desc')); return $this->_list(['dateFormat' => DateTimeHelper::shortDateFormat(), 'timeFormat' => DateTimeHelper::shortTimeFormat()]); }