Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the adopted coding style by adding a [PHP CS Fixer][1] or [PHP CodeSniffer][2] config to your project root. Feel free to use [Shift's Laravel ruleset][3] to help you get started. For more information on customizing the code style applied by Shift, [watch this short video][4]. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://github.com/squizlabs/PHP_CodeSniffer [3]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 [4]: https://laravelshift.com/videos/shift-code-style
This commit is contained in:
parent
0fe6565346
commit
b1dc4d4a41
86 changed files with 1051 additions and 1093 deletions
|
@ -20,7 +20,6 @@ class Application extends Model
|
|||
@copy($img_src, $img_dest);
|
||||
}
|
||||
|
||||
|
||||
return $this->icon;
|
||||
}
|
||||
|
||||
|
@ -32,7 +31,10 @@ class Application extends Model
|
|||
public function defaultColour()
|
||||
{
|
||||
// check if light or dark
|
||||
if($this->tile_background == 'light') return '#fafbfc';
|
||||
if ($this->tile_background == 'light') {
|
||||
return '#fafbfc';
|
||||
}
|
||||
|
||||
return '#161b1f';
|
||||
}
|
||||
|
||||
|
@ -42,6 +44,7 @@ class Application extends Model
|
|||
$name = preg_replace('/[^\p{L}\p{N}]/u', '', $name);
|
||||
|
||||
$class = '\App\SupportedApps\\'.$name.'\\'.$name;
|
||||
|
||||
return $class;
|
||||
}
|
||||
|
||||
|
@ -50,15 +53,16 @@ class Application extends Model
|
|||
$name = preg_replace('/[^\p{L}\p{N}]/u', '', $name);
|
||||
|
||||
$class = '\App\SupportedApps\\'.$name.'\\'.$name;
|
||||
|
||||
return $class;
|
||||
}
|
||||
|
||||
|
||||
public static function apps()
|
||||
{
|
||||
$json = json_decode(file_get_contents(storage_path('app/supportedapps.json'))) ?? [];
|
||||
$apps = collect($json->apps);
|
||||
$sorted = $apps->sortBy('name', SORT_NATURAL | SORT_FLAG_CASE);
|
||||
|
||||
return $sorted;
|
||||
}
|
||||
|
||||
|
@ -69,18 +73,19 @@ class Application extends Model
|
|||
foreach ($apps as $app) {
|
||||
$list[] = (object) [
|
||||
'label' => $app->name,
|
||||
'value' => $app->appid
|
||||
'value' => $app->appid,
|
||||
];
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
public static function getApp($appid)
|
||||
{
|
||||
$localapp = Application::where('appid', $appid)->first();
|
||||
$localapp = self::where('appid', $appid)->first();
|
||||
$app = self::single($appid);
|
||||
|
||||
$application = ($localapp) ? $localapp : new Application;
|
||||
$application = ($localapp) ? $localapp : new self;
|
||||
|
||||
if (! file_exists(app_path('SupportedApps/'.className($app->name)))) {
|
||||
SupportedApps::getFiles($app);
|
||||
|
@ -95,20 +100,22 @@ class Application extends Model
|
|||
} else {
|
||||
SupportedApps::getFiles($app);
|
||||
$app = SupportedApps::saveApp($app, $application);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return $app;
|
||||
|
||||
}
|
||||
|
||||
public static function single($appid)
|
||||
{
|
||||
$apps = self::apps();
|
||||
$app = $apps->where('appid', $appid)->first();
|
||||
if ($app === null) return null;
|
||||
if ($app === null) {
|
||||
return null;
|
||||
}
|
||||
$classname = preg_replace('/[^\p{L}\p{N}]/u', '', $app->name);
|
||||
$app->class = '\App\SupportedApps\\'.$classname.'\\'.$classname;
|
||||
|
||||
return $app;
|
||||
}
|
||||
|
||||
|
@ -120,8 +127,7 @@ class Application extends Model
|
|||
foreach ($apps as $app) {
|
||||
$list[$app->appid] = $app->name;
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Application;
|
||||
use App\SupportedApps;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class RegisterApp extends Command
|
||||
{
|
||||
|
@ -43,14 +43,14 @@ class RegisterApp extends Command
|
|||
if ($folder == 'all') {
|
||||
$apps = scandir(app_path('SupportedApps'));
|
||||
foreach ($apps as $folder) {
|
||||
if($folder == '.' || $folder == '..') continue;
|
||||
if ($folder == '.' || $folder == '..') {
|
||||
continue;
|
||||
}
|
||||
$this->addApp($folder);
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->addApp($folder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function addApp($folder)
|
||||
|
@ -61,19 +61,17 @@ class RegisterApp extends Command
|
|||
if (isset($app->appid)) {
|
||||
$exists = Application::find($app->appid);
|
||||
if ($exists) {
|
||||
$this->error('Application already registered - '.$exists->name." - ".$exists->appid);
|
||||
$this->error('Application already registered - '.$exists->name.' - '.$exists->appid);
|
||||
} else {
|
||||
// Doesn't exist so add it
|
||||
SupportedApps::saveApp($app, new Application);
|
||||
$this->info("Application Added - ".$app->name." - ".$app->appid);
|
||||
$this->info('Application Added - '.$app->name.' - '.$app->appid);
|
||||
}
|
||||
} else {
|
||||
$this->error('No App ID for - '.$folder);
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->error('Could not find '.$json);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
<?php namespace App;
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
interface EnhancedApps
|
||||
{
|
||||
public function test();
|
||||
public function livestats();
|
||||
public function url($endpoint);
|
||||
|
||||
public function livestats();
|
||||
|
||||
public function url($endpoint);
|
||||
}
|
|
@ -5,12 +5,17 @@ use Illuminate\Support\Str;
|
|||
function format_bytes($bytes, $is_drive_size = true, $beforeunit = '', $afterunit = '')
|
||||
{
|
||||
$btype = ($is_drive_size === true) ? 1000 : 1024;
|
||||
$labels = array('B','KB','MB','GB','TB');
|
||||
$labels = ['B', 'KB', 'MB', 'GB', 'TB'];
|
||||
for ($x = 0; $bytes >= $btype && $x < (count($labels) - 1); $bytes /= $btype, $x++); // use 1000 rather than 1024 to simulate HD size not real size
|
||||
if($labels[$x] == "TB") return(round($bytes, 3).$beforeunit.$labels[$x].$afterunit);
|
||||
elseif($labels[$x] == "GB") return(round($bytes, 2).$beforeunit.$labels[$x].$afterunit);
|
||||
elseif($labels[$x] == "MB") return(round($bytes, 2).$beforeunit.$labels[$x].$afterunit);
|
||||
else return(round($bytes, 0).$beforeunit.$labels[$x].$afterunit);
|
||||
if ($labels[$x] == 'TB') {
|
||||
return round($bytes, 3).$beforeunit.$labels[$x].$afterunit;
|
||||
} elseif ($labels[$x] == 'GB') {
|
||||
return round($bytes, 2).$beforeunit.$labels[$x].$afterunit;
|
||||
} elseif ($labels[$x] == 'MB') {
|
||||
return round($bytes, 2).$beforeunit.$labels[$x].$afterunit;
|
||||
} else {
|
||||
return round($bytes, 0).$beforeunit.$labels[$x].$afterunit;
|
||||
}
|
||||
}
|
||||
|
||||
function str_slug($title, $separator = '-', $language = 'en')
|
||||
|
@ -34,7 +39,8 @@ if (! function_exists('str_is')) {
|
|||
}
|
||||
}
|
||||
|
||||
function get_brightness($hex) {
|
||||
function get_brightness($hex)
|
||||
{
|
||||
// returns brightness value from 0 to 255
|
||||
// strip off any leading #
|
||||
$hex = str_replace('#', '', $hex);
|
||||
|
@ -69,11 +75,9 @@ function getLinkTargetAttribute()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function className($name)
|
||||
{
|
||||
$name = preg_replace('/[^\p{L}\p{N}]/u', '', $name);
|
||||
|
||||
return $name;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
@ -92,6 +92,7 @@ class LoginController extends Controller
|
|||
{
|
||||
Auth::logout();
|
||||
session(['current_user' => $user]);
|
||||
|
||||
return redirect()->route('dash');
|
||||
}
|
||||
|
||||
|
@ -100,6 +101,7 @@ class LoginController extends Controller
|
|||
$user = User::where('autologin', $uuid)->first();
|
||||
Auth::login($user, true);
|
||||
session(['current_user' => $user]);
|
||||
|
||||
return redirect()->route('dash');
|
||||
}
|
||||
|
||||
|
@ -122,5 +124,4 @@ class LoginController extends Controller
|
|||
{
|
||||
return Session::get('url.intended') ? Session::get('url.intended') : $this->redirectTo;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
|
@ -22,7 +22,6 @@ class Controller extends BaseController
|
|||
//print_r($this->user);
|
||||
return $next($request);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public function user()
|
||||
|
|
|
@ -2,23 +2,21 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Artisan;
|
||||
use App\Application;
|
||||
use App\Item;
|
||||
use App\Setting;
|
||||
use App\User;
|
||||
use GrahamCampbell\GitHub\Facades\GitHub;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\SupportedApps;
|
||||
use App\Jobs\ProcessApps;
|
||||
use App\Search;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use App\Setting;
|
||||
use App\SupportedApps;
|
||||
use App\User;
|
||||
use Artisan;
|
||||
use GrahamCampbell\GitHub\Facades\GitHub;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ItemController extends Controller
|
||||
{
|
||||
|
@ -26,6 +24,7 @@ class ItemController extends Controller
|
|||
{
|
||||
$this->middleware('allowed');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource on the dashboard.
|
||||
*
|
||||
|
@ -72,6 +71,7 @@ class ItemController extends Controller
|
|||
$item->pinned = true;
|
||||
$item->save();
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route);
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,7 @@ class ItemController extends Controller
|
|||
$item->pinned = false;
|
||||
$item->save();
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route);
|
||||
}
|
||||
|
||||
|
@ -108,14 +109,15 @@ class ItemController extends Controller
|
|||
$data['apps'] = Item::pinned()->orderBy('order', 'asc')->get();
|
||||
}
|
||||
$data['ajax'] = true;
|
||||
|
||||
return view('sortable', $data);
|
||||
} else {
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -134,7 +136,6 @@ class ItemController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
|
@ -146,8 +147,8 @@ class ItemController extends Controller
|
|||
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');
|
||||
$data['tags']->prepend(__('app.dashboard'), 0);
|
||||
$data['current_tags'] = '0';
|
||||
return view('items.create', $data);
|
||||
|
||||
return view('items.create', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,7 +177,6 @@ class ItemController extends Controller
|
|||
return view('items.edit', $data);
|
||||
}
|
||||
|
||||
|
||||
public function storelogic($request, $id = null)
|
||||
{
|
||||
$application = Application::single($request->input('appid'));
|
||||
|
@ -188,7 +188,7 @@ class ItemController extends Controller
|
|||
if ($request->hasFile('file')) {
|
||||
$path = $request->file('file')->store('icons');
|
||||
$request->merge([
|
||||
'icon' => $path
|
||||
'icon' => $path,
|
||||
]);
|
||||
} elseif (strpos($request->input('icon'), 'http') === 0) {
|
||||
$contents = file_get_contents($request->input('icon'));
|
||||
|
@ -204,7 +204,7 @@ class ItemController extends Controller
|
|||
$path = 'icons/'.$icon;
|
||||
Storage::disk('public')->put($path, $contents);
|
||||
$request->merge([
|
||||
'icon' => $path
|
||||
'icon' => $path,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ class ItemController extends Controller
|
|||
$current_user = User::currentUser();
|
||||
$request->merge([
|
||||
'description' => $config,
|
||||
'user_id' => $current_user->id
|
||||
'user_id' => $current_user->id,
|
||||
]);
|
||||
|
||||
if ($request->input('appid') === 'null') {
|
||||
|
@ -223,10 +223,8 @@ class ItemController extends Controller
|
|||
$request->merge([
|
||||
'class' => Application::classFromName($application->name),
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ($id === null) {
|
||||
$item = Item::create($request->all());
|
||||
} else {
|
||||
|
@ -234,9 +232,7 @@ class ItemController extends Controller
|
|||
$item->update($request->all());
|
||||
}
|
||||
|
||||
|
||||
$item->parents()->sync($request->tags);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -250,6 +246,7 @@ class ItemController extends Controller
|
|||
$this->storelogic($request);
|
||||
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.item_created'));
|
||||
}
|
||||
|
@ -265,7 +262,6 @@ class ItemController extends Controller
|
|||
//
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
|
@ -277,6 +273,7 @@ class ItemController extends Controller
|
|||
{
|
||||
$this->storelogic($request, $id);
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.item_updated'));
|
||||
}
|
||||
|
@ -300,6 +297,7 @@ class ItemController extends Controller
|
|||
}
|
||||
|
||||
$route = route('items.index', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.item_deleted'));
|
||||
}
|
||||
|
@ -318,6 +316,7 @@ class ItemController extends Controller
|
|||
->restore();
|
||||
|
||||
$route = route('items.index', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.item_restored'));
|
||||
}
|
||||
|
@ -332,7 +331,9 @@ class ItemController extends Controller
|
|||
$output = [];
|
||||
$appid = $request->input('app');
|
||||
|
||||
if($appid === "null") return null;
|
||||
if ($appid === 'null') {
|
||||
return null;
|
||||
}
|
||||
/*$appname = $request->input('app');
|
||||
//die($appname);
|
||||
|
||||
|
@ -362,7 +363,7 @@ class ItemController extends Controller
|
|||
|
||||
$appdetails = Application::getApp($appid);
|
||||
|
||||
if((boolean)$app->enhanced === true) {
|
||||
if ((bool) $app->enhanced === true) {
|
||||
// if(!isset($app->config)) { // class based config
|
||||
$output['custom'] = className($appdetails->name).'.config';
|
||||
// }
|
||||
|
@ -371,9 +372,6 @@ class ItemController extends Controller
|
|||
$output['colour'] = ($app->tile_background == 'light') ? '#fafbfc' : '#161b1f';
|
||||
$output['iconview'] = config('app.appsource').'icons/'.$app->icon;
|
||||
|
||||
;
|
||||
|
||||
|
||||
return json_encode($output);
|
||||
}
|
||||
|
||||
|
@ -398,7 +396,7 @@ class ItemController extends Controller
|
|||
'http_errors' => false,
|
||||
'timeout' => 15,
|
||||
'connect_timeout' => 15,
|
||||
'verify' => false
|
||||
'verify' => false,
|
||||
];
|
||||
|
||||
$client = new Client($vars);
|
||||
|
@ -408,19 +406,20 @@ class ItemController extends Controller
|
|||
try {
|
||||
return $client->request($method, $url, $attrs);
|
||||
} catch (\GuzzleHttp\Exception\ConnectException $e) {
|
||||
Log::error("Connection refused");
|
||||
Log::error('Connection refused');
|
||||
Log::debug($e->getMessage());
|
||||
} catch (\GuzzleHttp\Exception\ServerException $e) {
|
||||
Log::debug($e->getMessage());
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
public function websitelookup($url)
|
||||
{
|
||||
$url = \base64_decode($url);
|
||||
$data = $this->execute($url);
|
||||
|
||||
return $data->getBody();
|
||||
}
|
||||
|
||||
|
@ -434,21 +433,14 @@ class ItemController extends Controller
|
|||
$application->config = $config;
|
||||
echo $application->livestats();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function checkAppList()
|
||||
{
|
||||
ProcessApps::dispatch();
|
||||
$route = route('items.index');
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.updating'));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Search;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SearchController extends Controller
|
||||
{
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Setting;
|
||||
use App\SettingGroup;
|
||||
use App\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class SettingsController extends Controller
|
||||
{
|
||||
|
@ -40,7 +40,9 @@ class SettingsController extends Controller
|
|||
$setting = Setting::find($id);
|
||||
//die("s: ".$setting->label);
|
||||
|
||||
if((bool)$setting->system === true) return abort(404);
|
||||
if ((bool) $setting->system === true) {
|
||||
return abort(404);
|
||||
}
|
||||
|
||||
if (! is_null($setting)) {
|
||||
return view('settings.edit')->with([
|
||||
|
@ -48,6 +50,7 @@ class SettingsController extends Controller
|
|||
]);
|
||||
} else {
|
||||
$route = route('settings.list', []);
|
||||
|
||||
return redirect($route)
|
||||
->with([
|
||||
'error' => __('app.alert.error.not_exist'),
|
||||
|
@ -71,13 +74,10 @@ class SettingsController extends Controller
|
|||
$setting_value = null;
|
||||
|
||||
if ($setting->type == 'image') {
|
||||
|
||||
|
||||
if ($request->hasFile('value')) {
|
||||
$path = $request->file('value')->store('backgrounds');
|
||||
$setting_value = $path;
|
||||
}
|
||||
|
||||
} else {
|
||||
$setting_value = $data->value;
|
||||
}
|
||||
|
@ -86,18 +86,21 @@ class SettingsController extends Controller
|
|||
$user->settings()->save($setting, ['uservalue' => $setting_value]);
|
||||
|
||||
$route = route('settings.index', []);
|
||||
|
||||
return redirect($route)
|
||||
->with([
|
||||
'success' => __('app.alert.success.setting_updated'),
|
||||
]);
|
||||
} else {
|
||||
$route = route('settings.index', []);
|
||||
|
||||
return redirect($route)
|
||||
->with([
|
||||
'error' => __('app.alert.error.not_exist'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
*
|
||||
|
@ -112,16 +115,14 @@ class SettingsController extends Controller
|
|||
$user->settings()->save($setting, ['uservalue' => '']);
|
||||
}
|
||||
$route = route('settings.index', []);
|
||||
|
||||
return redirect($route)
|
||||
->with([
|
||||
'success' => __('app.alert.success.setting_updated'),
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
public function search(Request $request)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Item;
|
||||
use App\User;
|
||||
use DB;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TagController extends Controller
|
||||
{
|
||||
|
@ -13,6 +13,7 @@ class TagController extends Controller
|
|||
{
|
||||
$this->middleware('allowed');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -39,6 +40,7 @@ class TagController extends Controller
|
|||
public function create()
|
||||
{
|
||||
$data = [];
|
||||
|
||||
return view('tags.create', $data);
|
||||
}
|
||||
|
||||
|
@ -57,7 +59,7 @@ class TagController extends Controller
|
|||
if ($request->hasFile('file')) {
|
||||
$path = $request->file('file')->store('icons');
|
||||
$request->merge([
|
||||
'icon' => $path
|
||||
'icon' => $path,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -69,12 +71,13 @@ class TagController extends Controller
|
|||
$request->merge([
|
||||
'type' => '1',
|
||||
'url' => $slug,
|
||||
'user_id' => $current_user->id
|
||||
'user_id' => $current_user->id,
|
||||
]);
|
||||
//die(print_r($request->all()));
|
||||
Item::create($request->all());
|
||||
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.tag_created'));
|
||||
}
|
||||
|
@ -92,6 +95,7 @@ class TagController extends Controller
|
|||
$data['apps'] = $item->children()->pinned()->orderBy('order', 'asc')->get();
|
||||
$data['tag'] = $item->id;
|
||||
$data['all_apps'] = $item->children;
|
||||
|
||||
return view('welcome', $data);
|
||||
}
|
||||
|
||||
|
@ -127,19 +131,20 @@ class TagController extends Controller
|
|||
if ($request->hasFile('file')) {
|
||||
$path = $request->file('file')->store('icons');
|
||||
$request->merge([
|
||||
'icon' => $path
|
||||
'icon' => $path,
|
||||
]);
|
||||
}
|
||||
|
||||
$slug = str_slug($request->title, '-');
|
||||
// set item type to tag
|
||||
$request->merge([
|
||||
'url' => $slug
|
||||
'url' => $slug,
|
||||
]);
|
||||
|
||||
Item::find($id)->update($request->all());
|
||||
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.tag_updated'));
|
||||
}
|
||||
|
@ -163,6 +168,7 @@ class TagController extends Controller
|
|||
}
|
||||
|
||||
$route = route('tags.index', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.item_deleted'));
|
||||
}
|
||||
|
@ -180,6 +186,7 @@ class TagController extends Controller
|
|||
->where('id', $id)
|
||||
->restore();
|
||||
$route = route('tags.index', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.item_restored'));
|
||||
}
|
||||
|
@ -193,10 +200,11 @@ class TagController extends Controller
|
|||
// only add items, not cats
|
||||
if ((int) $item->type === 0) {
|
||||
$tag->children()->attach($item);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ class UserController extends Controller
|
|||
{
|
||||
$this->middleware('allowed')->except(['selectUser']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -22,6 +23,7 @@ class UserController extends Controller
|
|||
public function index()
|
||||
{
|
||||
$data['users'] = User::all();
|
||||
|
||||
return view('users.index', $data);
|
||||
}
|
||||
|
||||
|
@ -33,6 +35,7 @@ class UserController extends Controller
|
|||
public function create()
|
||||
{
|
||||
$data = [];
|
||||
|
||||
return view('users.create', $data);
|
||||
}
|
||||
|
||||
|
@ -40,8 +43,8 @@ class UserController extends Controller
|
|||
{
|
||||
Auth::logout();
|
||||
$data['users'] = User::all();
|
||||
return view('userselect', $data);
|
||||
|
||||
return view('userselect', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,7 +59,7 @@ class UserController extends Controller
|
|||
'username' => 'required|max:255|unique:users',
|
||||
'email' => 'required|email',
|
||||
'password' => 'nullable|confirmed',
|
||||
'password_confirmation' => 'nullable'
|
||||
'password_confirmation' => 'nullable',
|
||||
|
||||
]);
|
||||
$user = new User;
|
||||
|
@ -81,6 +84,7 @@ class UserController extends Controller
|
|||
$user->save();
|
||||
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.user_updated'));
|
||||
}
|
||||
|
@ -105,8 +109,8 @@ class UserController extends Controller
|
|||
public function edit(User $user)
|
||||
{
|
||||
$data['user'] = $user;
|
||||
return view('users.edit', $data);
|
||||
|
||||
return view('users.edit', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,7 +126,7 @@ class UserController extends Controller
|
|||
'username' => 'required|max:255|unique:users,username,'.$user->id,
|
||||
'email' => 'required|email',
|
||||
'password' => 'nullable|confirmed',
|
||||
'password_confirmation' => 'nullable'
|
||||
'password_confirmation' => 'nullable',
|
||||
]);
|
||||
//die(print_r($request->all()));
|
||||
|
||||
|
@ -151,9 +155,9 @@ class UserController extends Controller
|
|||
$user->save();
|
||||
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.user_updated'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -167,9 +171,9 @@ class UserController extends Controller
|
|||
if ($user->id !== 1) {
|
||||
$user->delete();
|
||||
$route = route('dash', []);
|
||||
|
||||
return redirect($route)
|
||||
->with('success', __('app.alert.success.user_deleted'));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\User;
|
||||
use Closure;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Session;
|
||||
|
||||
|
@ -31,18 +31,23 @@ class CheckAllowed
|
|||
if ($route == 'dash') {
|
||||
//print_r(User::all());
|
||||
//die("here".var_dump($current_user->password));
|
||||
if((bool)$current_user->public_front === true) return $next($request);
|
||||
if ((bool) $current_user->public_front === true) {
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($current_user->password)) return $next($request);
|
||||
if (empty($current_user->password)) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
// Check if user is logged in as $current_user
|
||||
if (Auth::check()) {
|
||||
$loggedin_user = Auth::user();
|
||||
if($loggedin_user->id === $current_user->id) return $next($request);
|
||||
if ($loggedin_user->id === $current_user->id) {
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
||||
return Auth::authenticate();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
|
|
|
@ -54,5 +54,4 @@ class VerifyCsrfToken extends Middleware
|
|||
{
|
||||
return EncryptCookies::serialized('HEIMDALL-XSRF-TOKEN');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
52
app/Item.php
52
app/Item.php
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Symfony\Component\ClassLoader\ClassMapGenerator;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\User;
|
||||
use App\ItemTag;
|
||||
use App\Application;
|
||||
use App\ItemTag;
|
||||
use App\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Symfony\Component\ClassLoader\ClassMapGenerator;
|
||||
|
||||
class Item extends Model
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ class Item extends Model
|
|||
|
||||
//
|
||||
protected $fillable = [
|
||||
'title', 'url', 'colour', 'icon', 'appdescription', 'description', 'pinned', 'order', 'type', 'class', 'user_id', 'appid'
|
||||
'title', 'url', 'colour', 'icon', 'appdescription', 'description', 'pinned', 'order', 'type', 'class', 'user_id', 'appid',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -59,26 +59,26 @@ class Item extends Model
|
|||
} else {
|
||||
$config = json_encode($config);
|
||||
}
|
||||
|
||||
return $config;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function tags()
|
||||
{
|
||||
$id = $this->id;
|
||||
$tags = ItemTag::select('tag_id')->where('item_id', $id)->pluck('tag_id')->toArray();
|
||||
$tagdetails = Item::select('id', 'title', 'url', 'pinned')->whereIn('id', $tags)->get();
|
||||
$tagdetails = self::select('id', 'title', 'url', 'pinned')->whereIn('id', $tags)->get();
|
||||
//print_r($tags);
|
||||
if (in_array(0, $tags)) {
|
||||
$details = new Item([
|
||||
"id" => 0,
|
||||
"title" => __('app.dashboard'),
|
||||
"url" => '',
|
||||
"pinned" => 0
|
||||
$details = new self([
|
||||
'id' => 0,
|
||||
'title' => __('app.dashboard'),
|
||||
'url' => '',
|
||||
'pinned' => 0,
|
||||
]);
|
||||
$tagdetails->prepend($details);
|
||||
}
|
||||
|
||||
return $tagdetails;
|
||||
}
|
||||
|
||||
|
@ -86,6 +86,7 @@ class Item extends Model
|
|||
{
|
||||
return $this->belongsToMany('App\Item', 'item_tag', 'item_id', 'tag_id');
|
||||
}
|
||||
|
||||
public function children()
|
||||
{
|
||||
return $this->belongsToMany('App\Item', 'item_tag', 'tag_id', 'item_id');
|
||||
|
@ -128,6 +129,7 @@ class Item extends Model
|
|||
return 'fa-arrow-alt-to-right';
|
||||
}
|
||||
}
|
||||
|
||||
public function getLinkTypeAttribute()
|
||||
{
|
||||
if ((int) $this->type === 1) {
|
||||
|
@ -172,14 +174,18 @@ class Item extends Model
|
|||
|
||||
public static function isEnhanced($class)
|
||||
{
|
||||
if($class === null || $class === 'null') return false;
|
||||
if ($class === null || $class === 'null') {
|
||||
return false;
|
||||
}
|
||||
$app = new $class;
|
||||
|
||||
return (bool) ($app instanceof \App\EnhancedApps);
|
||||
}
|
||||
|
||||
public static function isSearchProvider($class)
|
||||
{
|
||||
$app = new $class;
|
||||
|
||||
return ((bool) ($app instanceof \App\SearchInterface)) ? $app : false;
|
||||
}
|
||||
|
||||
|
@ -191,6 +197,7 @@ class Item extends Model
|
|||
return (bool) $config->enabled;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -198,23 +205,20 @@ class Item extends Model
|
|||
{
|
||||
// $explode = explode('\\', $this->class);
|
||||
|
||||
|
||||
if (! isset($this->description) || empty($this->description)) {
|
||||
$config = new \stdClass;
|
||||
// $config->name = end($explode);
|
||||
$config->enabled = false;
|
||||
$config->override_url = null;
|
||||
$config->apikey = null;
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$config = json_decode($this->description);
|
||||
|
||||
// $config->name = end($explode);
|
||||
|
||||
|
||||
$config->url = $this->url;
|
||||
if (isset($config->override_url) && ! empty($config->override_url)) {
|
||||
$config->url = $config->override_url;
|
||||
|
@ -230,11 +234,12 @@ class Item extends Model
|
|||
if (! empty($class)) {
|
||||
$name = self::nameFromClass($class);
|
||||
$application = Application::where('name', $name)->first();
|
||||
if($application) return $application;
|
||||
if ($application) {
|
||||
return $application;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public static function getApplicationDescription($class)
|
||||
|
@ -243,6 +248,7 @@ class Item extends Model
|
|||
if ($details !== false) {
|
||||
return $details->description.' - '.$details->license;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -253,6 +259,4 @@ class Item extends Model
|
|||
{
|
||||
return $this->belongsTo('App\User');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,5 +6,4 @@ use Illuminate\Database\Eloquent\Relations\Pivot;
|
|||
|
||||
class ItemTag extends Pivot
|
||||
{
|
||||
|
||||
}
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Application;
|
||||
use App\Item;
|
||||
use App\SupportedApps;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Application;
|
||||
use App\SupportedApps;
|
||||
use App\Item;
|
||||
|
||||
class ProcessApps implements ShouldQueue
|
||||
{
|
||||
|
@ -50,6 +50,5 @@ class ProcessApps implements ShouldQueue
|
|||
Application::getApp($app->appid);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Artisan;
|
||||
use Schema;
|
||||
use App\Setting;
|
||||
use App\User;
|
||||
use App\Application;
|
||||
use App\Jobs\ProcessApps;
|
||||
use App\Setting;
|
||||
use App\User;
|
||||
use Artisan;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Schema;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -19,7 +19,6 @@ class AppServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot()
|
||||
{
|
||||
|
||||
if (! is_file(base_path('.env'))) {
|
||||
copy(base_path('.env.example'), base_path('.env'));
|
||||
}
|
||||
|
@ -27,7 +26,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
if (! is_file(database_path('app.sqlite'))) {
|
||||
// first time setup
|
||||
touch(database_path('app.sqlite'));
|
||||
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true));
|
||||
Artisan::call('migrate', ['--path' => 'database/migrations', '--force' => true, '--seed' => true]);
|
||||
//Cache
|
||||
//Artisan::call('config:cache');
|
||||
//Artisan::call('route:cache');
|
||||
|
@ -39,13 +38,11 @@ class AppServiceProvider extends ServiceProvider
|
|||
$db_version = Setting::_fetch('version');
|
||||
$app_version = config('app.version');
|
||||
if (version_compare($app_version, $db_version) == 1) { // app is higher than db, so need to run migrations etc
|
||||
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true));
|
||||
Artisan::call('migrate', ['--path' => 'database/migrations', '--force' => true, '--seed' => true]);
|
||||
}
|
||||
|
||||
} else {
|
||||
Artisan::call('migrate', array('--path' => 'database/migrations', '--force' => true, '--seed' => true));
|
||||
Artisan::call('migrate', ['--path' => 'database/migrations', '--force' => true, '--seed' => true]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (! is_file(public_path('storage/.gitignore'))) {
|
||||
|
@ -56,21 +53,17 @@ class AppServiceProvider extends ServiceProvider
|
|||
$lang = Setting::fetch('language');
|
||||
\App::setLocale($lang);
|
||||
|
||||
|
||||
$applications = Application::all();
|
||||
if ($applications->count() <= 0) {
|
||||
if (class_exists('ZipArchive')) {
|
||||
ProcessApps::dispatch();
|
||||
} else {
|
||||
die("You are missing php-zip");
|
||||
die('You are missing php-zip');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// User specific settings need to go here as session isn't available at this point in the app
|
||||
view()->composer('*', function ($view)
|
||||
{
|
||||
|
||||
view()->composer('*', function ($view) {
|
||||
if (isset($_SERVER['HTTP_AUTHORIZATION']) && ! empty($_SERVER['HTTP_AUTHORIZATION'])) {
|
||||
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) =
|
||||
explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
|
||||
|
@ -86,8 +79,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
//\Session::put('current_user', $user);
|
||||
session(['current_user' => $user]);
|
||||
}
|
||||
}
|
||||
elseif(isset($_SERVER['REMOTE_USER']) && !empty($_SERVER['REMOTE_USER'])) {
|
||||
} elseif (isset($_SERVER['REMOTE_USER']) && ! empty($_SERVER['REMOTE_USER'])) {
|
||||
$user = User::where('username', $_SERVER['REMOTE_USER'])->first();
|
||||
if ($user) {
|
||||
\Auth::login($user, true);
|
||||
|
@ -96,7 +88,6 @@ class AppServiceProvider extends ServiceProvider
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
$alt_bg = '';
|
||||
if ($bg_image = Setting::fetch('background_image')) {
|
||||
$alt_bg = ' style="background-image: url(storage/'.$bg_image.')"';
|
||||
|
@ -108,15 +99,10 @@ class AppServiceProvider extends ServiceProvider
|
|||
$view->with('alt_bg', $alt_bg);
|
||||
$view->with('allusers', $allusers);
|
||||
$view->with('current_user', $current_user);
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$this->app['view']->addNamespace('SupportedApps', app_path('SupportedApps'));
|
||||
|
||||
|
||||
if (env('FORCE_HTTPS') === true) {
|
||||
\URL::forceScheme('https');
|
||||
}
|
||||
|
@ -124,7 +110,6 @@ class AppServiceProvider extends ServiceProvider
|
|||
if (env('APP_URL') != 'http://localhost') {
|
||||
\URL::forceRootUrl(env('APP_URL'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -136,12 +121,11 @@ class AppServiceProvider extends ServiceProvider
|
|||
{
|
||||
if (is_file(base_path('.env'))) {
|
||||
if (empty(env('APP_KEY'))) {
|
||||
Artisan::call('key:generate', array('--force' => true, '--no-interaction' => true));
|
||||
Artisan::call('key:generate', ['--force' => true, '--no-interaction' => true]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
class AuthServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Broadcast;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
|
|
@ -1,44 +1,49 @@
|
|||
<?php namespace App;
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Client;
|
||||
use App\Item;
|
||||
use App\Setting;
|
||||
use Form;
|
||||
use Cache;
|
||||
use Form;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Yaml;
|
||||
|
||||
abstract class Search
|
||||
{
|
||||
|
||||
/**
|
||||
* List of all search providers
|
||||
*
|
||||
* @return Array
|
||||
* @return array
|
||||
*/
|
||||
public static function providers()
|
||||
{
|
||||
$providers = self::standardProviders();
|
||||
$providers = $providers + self::appProviders();
|
||||
|
||||
return collect($providers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets details for a single provider
|
||||
*
|
||||
* @return Object
|
||||
* @return object
|
||||
*/
|
||||
public static function providerDetails($provider)
|
||||
{
|
||||
$providers = self::providers();
|
||||
if(!isset($providers[$provider])) return false;
|
||||
if (! isset($providers[$provider])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (object) $providers[$provider] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of the standard providers
|
||||
*
|
||||
* @return Array
|
||||
* @return array
|
||||
*/
|
||||
public static function standardProviders()
|
||||
{
|
||||
|
@ -58,14 +63,16 @@ abstract class Search
|
|||
* Loops through users apps to see if app is a search provider, might be worth
|
||||
* looking into caching this at some point
|
||||
*
|
||||
* @return Array
|
||||
* @return array
|
||||
*/
|
||||
public static function appProviders()
|
||||
{
|
||||
$providers = [];
|
||||
$userapps = Item::all();
|
||||
foreach ($userapps as $app) {
|
||||
if(empty($app->class)) continue;
|
||||
if (empty($app->class)) {
|
||||
continue;
|
||||
}
|
||||
if (($provider = Item::isSearchProvider($app->class)) !== false) {
|
||||
$name = Item::nameFromClass($app->class);
|
||||
$providers[$app->id] = [
|
||||
|
@ -76,11 +83,11 @@ abstract class Search
|
|||
'name' => $app->title,
|
||||
'colour' => $app->colour,
|
||||
'icon' => $app->icon,
|
||||
'description' => $app->description
|
||||
'description' => $app->description,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return $providers;
|
||||
}
|
||||
|
||||
|
@ -99,11 +106,12 @@ abstract class Search
|
|||
|
||||
//die(var_dump($user_search_provider));
|
||||
// return early if search isn't applicable
|
||||
if((bool)$homepage_search !== true) return $output;
|
||||
if ((bool) $homepage_search !== true) {
|
||||
return $output;
|
||||
}
|
||||
$user_search_provider = $user_search_provider ?? 'none';
|
||||
|
||||
if ((bool) $homepage_search && (bool) $search_provider) {
|
||||
|
||||
if ((bool) $user_search_provider) {
|
||||
$name = 'app.options.'.$user_search_provider;
|
||||
$provider = self::providerDetails($user_search_provider);
|
||||
|
@ -124,8 +132,7 @@ abstract class Search
|
|||
$output .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php namespace App;
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
|
||||
interface SearchInterface
|
||||
{
|
||||
public function getResults($query, $providerdetails);
|
||||
|
||||
}
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Form;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\User;
|
||||
use App\Search;
|
||||
use App\User;
|
||||
use Form;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
|
||||
class Setting extends Model
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ class Setting extends Model
|
|||
protected $table = 'settings';
|
||||
|
||||
protected $fillable = [
|
||||
'id', 'group_id', 'key', 'type', 'options', 'label', 'value', 'order', 'system'
|
||||
'id', 'group_id', 'key', 'type', 'options', 'label', 'value', 'order', 'system',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -88,7 +88,6 @@ class Setting extends Model
|
|||
}
|
||||
|
||||
return $value;
|
||||
|
||||
}
|
||||
|
||||
public function getEditValueAttribute()
|
||||
|
@ -113,7 +112,9 @@ class Setting extends Model
|
|||
break;
|
||||
case 'boolean':
|
||||
$checked = false;
|
||||
if(isset($this->value) && (bool)$this->value === true) $checked = true;
|
||||
if (isset($this->value) && (bool) $this->value === true) {
|
||||
$checked = true;
|
||||
}
|
||||
$set_checked = ($checked) ? ' checked="checked"' : '';
|
||||
$value = '
|
||||
<input type="hidden" name="value" value="0" />
|
||||
|
@ -142,7 +143,6 @@ class Setting extends Model
|
|||
}
|
||||
|
||||
return $value;
|
||||
|
||||
}
|
||||
|
||||
public function group()
|
||||
|
@ -150,7 +150,6 @@ class Setting extends Model
|
|||
return $this->belongsTo('App\SettingGroup', 'group_id');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
*
|
||||
|
@ -159,8 +158,10 @@ class Setting extends Model
|
|||
public static function fetch($key)
|
||||
{
|
||||
$user = self::user();
|
||||
|
||||
return self::_fetch($key, $user);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
*
|
||||
|
@ -168,10 +169,10 @@ class Setting extends Model
|
|||
*/
|
||||
public static function _fetch($key, $user = null)
|
||||
{
|
||||
#$cachekey = ($user === null) ? $key : $key.'-'.$user->id;
|
||||
#if (Setting::cached($cachekey)) {
|
||||
# return Setting::$cache[$cachekey];
|
||||
#} else {
|
||||
//$cachekey = ($user === null) ? $key : $key.'-'.$user->id;
|
||||
//if (Setting::cached($cachekey)) {
|
||||
// return Setting::$cache[$cachekey];
|
||||
//} else {
|
||||
$find = self::where('key', '=', $key)->first();
|
||||
|
||||
if (! is_null($find)) {
|
||||
|
@ -189,23 +190,22 @@ class Setting extends Model
|
|||
$value = $usersetting->pivot->uservalue;
|
||||
} else { // if not get default from base setting
|
||||
//$user->settings()->save($find, ['value' => $find->value]);
|
||||
#$has_setting = $user->settings()->where('id', $find->id)->exists();
|
||||
#if($has_setting) {
|
||||
# $user->settings()->updateExistingPivot($find->id, ['uservalue' => (string)$find->value]);
|
||||
#} else {
|
||||
# $user->settings()->save($find, ['uservalue' => (string)$find->value]);
|
||||
#}
|
||||
//$has_setting = $user->settings()->where('id', $find->id)->exists();
|
||||
//if($has_setting) {
|
||||
// $user->settings()->updateExistingPivot($find->id, ['uservalue' => (string)$find->value]);
|
||||
//} else {
|
||||
// $user->settings()->save($find, ['uservalue' => (string)$find->value]);
|
||||
//}
|
||||
$value = $find->value;
|
||||
}
|
||||
|
||||
}
|
||||
#Setting::add($cachekey, $value);
|
||||
//Setting::add($cachekey, $value);
|
||||
|
||||
return $value;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
#}
|
||||
//}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -214,7 +214,7 @@ class Setting extends Model
|
|||
*/
|
||||
public static function add($key, $value)
|
||||
{
|
||||
Setting::$cache[$key] = $value;
|
||||
self::$cache[$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -224,10 +224,9 @@ class Setting extends Model
|
|||
*/
|
||||
public static function cached($key)
|
||||
{
|
||||
return array_key_exists($key, Setting::$cache);
|
||||
return array_key_exists($key, self::$cache);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The users that belong to the setting.
|
||||
*/
|
||||
|
@ -240,6 +239,4 @@ class Setting extends Model
|
|||
{
|
||||
return User::currentUser();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
<?php namespace App;
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
abstract class SupportedApps
|
||||
{
|
||||
|
||||
protected $jar = false;
|
||||
|
||||
protected $method = 'GET';
|
||||
|
||||
protected $error;
|
||||
|
||||
public function appTest($url, $attrs = [], $overridevars = false)
|
||||
|
@ -42,6 +45,7 @@ abstract class SupportedApps
|
|||
$status = 'Something went wrong... Code: '.$res->getStatusCode();
|
||||
break;
|
||||
}
|
||||
|
||||
return (object) [
|
||||
'code' => $res->getStatusCode(),
|
||||
'status' => $status,
|
||||
|
@ -67,32 +71,31 @@ abstract class SupportedApps
|
|||
try {
|
||||
return $client->request($method, $url, $attrs);
|
||||
} catch (\GuzzleHttp\Exception\ConnectException $e) {
|
||||
Log::error("Connection refused");
|
||||
Log::error('Connection refused');
|
||||
Log::debug($e->getMessage());
|
||||
$this->error = "Connection refused - ".(string) $e->getMessage();
|
||||
$this->error = 'Connection refused - '.(string) $e->getMessage();
|
||||
} catch (\GuzzleHttp\Exception\ServerException $e) {
|
||||
Log::debug($e->getMessage());
|
||||
$this->error = (string) $e->getResponse()->getBody();
|
||||
}
|
||||
$this->error = 'General error connecting with API';
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function login()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function normaliseurl($url, $addslash = true)
|
||||
{
|
||||
|
||||
$url = rtrim($url, '/');
|
||||
if($addslash) $url .= '/';
|
||||
|
||||
return $url;
|
||||
|
||||
if ($addslash) {
|
||||
$url .= '/';
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
public function getLiveStats($status, $data)
|
||||
{
|
||||
|
@ -101,6 +104,7 @@ abstract class SupportedApps
|
|||
$name = end($explode);
|
||||
|
||||
$html = view('SupportedApps::'.$name.'.livestats', $data)->with('data', $data)->render();
|
||||
|
||||
return json_encode(['status' => $status, 'html' => $html]);
|
||||
//return
|
||||
}
|
||||
|
@ -110,6 +114,7 @@ abstract class SupportedApps
|
|||
// $list_url = 'https://apps.heimdall.site/list';
|
||||
$list_url = config('app.appsource').'list.json';
|
||||
$client = new Client(['http_errors' => false, 'timeout' => 15, 'connect_timeout' => 15]);
|
||||
|
||||
return $client->request('GET', $list_url);
|
||||
}
|
||||
|
||||
|
@ -117,7 +122,9 @@ abstract class SupportedApps
|
|||
{
|
||||
if (isset($item) && ! empty($item)) {
|
||||
return $item->getconfig()->$key;
|
||||
} else return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getFiles($app)
|
||||
|
@ -161,7 +168,7 @@ abstract class SupportedApps
|
|||
$app->enhanced = $enhanced;
|
||||
$app->tile_background = $details->tile_background;
|
||||
$app->save();
|
||||
|
||||
return $app;
|
||||
}
|
||||
|
||||
}
|
10
app/User.php
10
app/User.php
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
|
@ -49,15 +49,13 @@ class User extends Authenticatable
|
|||
if ($current_user) { // if logged in, set this user
|
||||
return $current_user;
|
||||
} else { // not logged in, get first user
|
||||
$user = User::where('public_front',true)->first();
|
||||
$user = self::where('public_front', true)->first();
|
||||
if (! $user) {
|
||||
$user = User::first();
|
||||
$user = self::first();
|
||||
}
|
||||
session(['current_user' => $user]);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@ return [
|
|||
'url' => env('APP_URL', 'http://localhost'),
|
||||
'appsource' => env('APP_SOURCE', 'https://appslist.heimdall.site/'),
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Timezone
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateItemsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSettingGroupsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddColumnsToItemsForGroups extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ItemTag extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreatePasswordResetsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUserIdToItemsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateSettingUserPivotTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateApplicationsTable extends Migration
|
||||
{
|
||||
|
@ -14,7 +14,6 @@ class CreateApplicationsTable extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::create('applications', function (Blueprint $table) {
|
||||
|
||||
$table->string('appid')->unique();
|
||||
$table->string('name')->unique();
|
||||
$table->string('sha')->unique()->nullable();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddClassToItemsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateJobsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFailedJobsTable extends Migration
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Setting;
|
||||
use App\SettingGroup;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SettingsSeeder extends Seeder
|
||||
{
|
||||
|
@ -106,7 +106,6 @@ class SettingsSeeder extends Seeder
|
|||
]);
|
||||
|
||||
if (! $setting = Setting::find(4)) {
|
||||
|
||||
$setting = new Setting;
|
||||
$setting->id = 4;
|
||||
$setting->group_id = 3;
|
||||
|
@ -121,7 +120,6 @@ class SettingsSeeder extends Seeder
|
|||
$setting->save();
|
||||
}
|
||||
|
||||
|
||||
$language_options = json_encode([
|
||||
'de' => 'Deutsch (German)',
|
||||
'en' => 'English',
|
||||
|
@ -157,7 +155,6 @@ class SettingsSeeder extends Seeder
|
|||
]);
|
||||
|
||||
if (! $setting = Setting::find(7)) {
|
||||
|
||||
$setting = new Setting;
|
||||
$setting->id = 7;
|
||||
$setting->group_id = 3;
|
||||
|
@ -249,10 +246,11 @@ class SettingsSeeder extends Seeder
|
|||
|
||||
$homeapps = \App\Item::withoutGlobalScope('user_id')->doesntHave('parents')->get();
|
||||
foreach ($homeapps as $app) {
|
||||
if($app->id === 0) continue;
|
||||
if ($app->id === 0) {
|
||||
continue;
|
||||
}
|
||||
$app->parents()->attach(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class UsersSeeder extends Seeder
|
||||
{
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'busca',
|
||||
'settings.no_items' => 'Nenhum item encontrado',
|
||||
|
||||
|
||||
'settings.label' => 'Rótulo',
|
||||
'settings.value' => 'Valor',
|
||||
'settings.edit' => 'Editar',
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => '搜索',
|
||||
'settings.no_items' => '没有可用项目',
|
||||
|
||||
|
||||
'settings.label' => '设置项',
|
||||
'settings.value' => '内容',
|
||||
'settings.edit' => '编辑',
|
||||
|
@ -116,5 +115,4 @@ return [
|
|||
'alert.success.user_deleted' => '用户删除成功',
|
||||
'alert.success.user_restored' => '用户复位成功',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'søg',
|
||||
'settings.no_items' => 'Intet fundet',
|
||||
|
||||
|
||||
'settings.label' => 'Etiket',
|
||||
'settings.value' => 'Værdi',
|
||||
'settings.edit' => 'Rediger',
|
||||
|
@ -116,5 +115,4 @@ return [
|
|||
'alert.success.user_deleted' => 'Bruger slettet med succes',
|
||||
'alert.success.user_restored' => 'Bruger genskabt med succes',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Din adgangskode er nulstillet!',
|
||||
'sent' => 'Vi har sendt dig en e-mail med et link til nulstilling af adgangskode!',
|
||||
'token' => 'Dit token er ikke gyldigt!',
|
||||
'user' => "Vi kan ikke finde en bruger med den e-mail-adresse.",
|
||||
'user' => 'Vi kan ikke finde en bruger med den e-mail-adresse.',
|
||||
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return array (
|
||||
return [
|
||||
'settings.system' => 'System',
|
||||
'settings.appearance' => 'Aussehen',
|
||||
'settings.miscellaneous' => 'Sonstiges',
|
||||
|
@ -57,4 +57,4 @@ return array (
|
|||
'alert.success.item_restored' => 'Element erfolgreich wiederhergestellt',
|
||||
'alert.success.setting_updated' => 'Die Einstellungen wurden übernommen',
|
||||
'alert.error.not_exist' => 'Diese Einstellung existiert nicht.',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'αναζήτηση',
|
||||
'settings.no_items' => 'Δε βρεθηκαν αποτελέσματα',
|
||||
|
||||
|
||||
'settings.label' => 'Ετικέτα',
|
||||
'settings.value' => 'Τιμή',
|
||||
'settings.edit' => 'Επεξεργασία',
|
||||
|
@ -116,5 +115,4 @@ return [
|
|||
'alert.success.user_deleted' => 'Ο χρήστης διαγράφηκε επιτυχώς',
|
||||
'alert.success.user_restored' => 'Ο χρήστης επαναφέρθηκε επιτυχώς',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Έχει γίνει επαναφορά του κωδικού σας!',
|
||||
'sent' => 'Σας στείλαμε ένα Ε-mail με τον σύνδεσμο για την επαναφορά του κωδικού πρόσβασής σας!',
|
||||
'token' => 'Αυτό το token για την επαναφορά του κωδικού πρόσβασής σας είναι άκυρο.',
|
||||
'user' => "Δεν μπορούμε να βρόυμε κάποιον χρήστη με αυτή τη διεύθυνση E-mail.",
|
||||
'user' => 'Δεν μπορούμε να βρόυμε κάποιον χρήστη με αυτή τη διεύθυνση E-mail.',
|
||||
|
||||
];
|
||||
|
|
|
@ -125,5 +125,4 @@ return [
|
|||
'alert.success.user_deleted' => 'User deleted successfully',
|
||||
'alert.success.user_restored' => 'User restored successfully',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return array (
|
||||
return [
|
||||
'settings.system' => 'Sistema',
|
||||
'settings.appearance' => 'Apariencia',
|
||||
'settings.miscellaneous' => 'Miscelánea',
|
||||
|
@ -57,4 +57,4 @@ return array (
|
|||
'alert.success.item_restored' => 'Elemento restaurado con éxito',
|
||||
'alert.success.setting_updated' => 'Ha editado con éxito esta configuración',
|
||||
'alert.error.not_exist' => 'Esta configuración no existe.',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return array (
|
||||
return [
|
||||
'settings.system' => 'Järjestelmä',
|
||||
'settings.appearance' => 'Ulkonäkö',
|
||||
'settings.miscellaneous' => 'Sekalainen',
|
||||
|
@ -21,13 +21,11 @@ return array (
|
|||
'settings.search' => 'haku',
|
||||
'settings.no_items' => 'Kohteita ei löytynyt',
|
||||
|
||||
|
||||
'settings.label' => 'Etiketti',
|
||||
'settings.value' => 'Arvo',
|
||||
'settings.edit' => 'Muokkaa',
|
||||
'settings.view' => 'Näkymä',
|
||||
|
||||
|
||||
'options.none' => '- ei asetettu -',
|
||||
'options.google' => 'Google',
|
||||
'options.ddg' => 'DuckDuckGo',
|
||||
|
@ -37,21 +35,18 @@ return array (
|
|||
'options.yes' => 'Kyllä',
|
||||
'options.no' => 'Ei',
|
||||
|
||||
|
||||
'buttons.save' => 'Tallenna',
|
||||
'buttons.cancel' => 'Peruuta',
|
||||
'buttons.add' => 'Lisää',
|
||||
'buttons.upload' => 'Lataa tiedosto',
|
||||
'buttons.downloadapps' => 'Päivitä sovelluslistaa',
|
||||
|
||||
|
||||
'dash.pin_item' => 'Kiinnitä kohde hallintapaneliin',
|
||||
'dash.no_apps' => 'Tällä hetkellä ei ole kiinnitettyjä sovelluksia :link1 tai :link2',
|
||||
'dash.link1' => 'Lisää sovellus tähän',
|
||||
'dash.link2' => 'Kiinnitä kohde hallintapaneliin',
|
||||
'dash.pinned_items' => 'Kiinnitetyt Kohteet',
|
||||
|
||||
|
||||
'apps.app_list' => 'Sovellusluettelo',
|
||||
'apps.view_trash' => 'Näytä roskakori',
|
||||
'apps.add_application' => 'Lisää sovellus',
|
||||
|
@ -73,7 +68,6 @@ return array (
|
|||
'apps.override' => 'Jos eri kuin pää-osoite',
|
||||
'apps.preview' => 'Esikatsele',
|
||||
|
||||
|
||||
'user.user_list' => 'Käyttäjät',
|
||||
'user.add_user' => 'Lisää käyttäjä',
|
||||
'user.username' => 'Käyttäjänimi',
|
||||
|
@ -83,33 +77,28 @@ return array (
|
|||
'user.secure_front' => 'Salli yleinen pääsy etusivulle - Pakotetaan ainoastaan jos salasana on asetettu.',
|
||||
'user.autologin' => 'Salli sisäänkirjautuminen tietystä URLista. Linkilläk uka tahansa pystyy kirjautua.',
|
||||
|
||||
|
||||
'url' => 'Url',
|
||||
'title' => 'Otsikko',
|
||||
'delete' => 'Poistaa',
|
||||
'optional' => 'Valinnainen',
|
||||
'restore' => 'Palauta',
|
||||
|
||||
|
||||
'alert.success.item_created' => 'Kohde luotu onnistuneesti',
|
||||
'alert.success.item_updated' => 'Kohde päivitetty onnistuneesti',
|
||||
'alert.success.item_deleted' => 'Kohde poistettu onnistuneesti',
|
||||
'alert.success.item_restored' => 'Kohde palautettu onnistuneesti',
|
||||
|
||||
|
||||
'alert.success.tag_created' => 'Tagi luotu onnistuneesti',
|
||||
'alert.success.tag_updated' => 'Tagi päivitetty onnistuneesti',
|
||||
'alert.success.tag_deleted' => 'Tagi poistettu onnistuneesti',
|
||||
'alert.success.tag_restored' => 'Tagi palautettu onnistuneesti',
|
||||
'alert.success.updating' => 'Päivitetään sovelluslistaa',
|
||||
|
||||
|
||||
'alert.success.setting_updated' => 'Asetus muokattu onnistuneesti',
|
||||
'alert.error.not_exist' => 'Tätä asetusta ei ole olemassa.',
|
||||
|
||||
|
||||
'alert.success.user_created' => 'Käyttäjä luotu onnistuneesti',
|
||||
'alert.success.user_updated' => 'Käyttäjä päivitetty onnistuneesti',
|
||||
'alert.success.user_deleted' => 'Käyttäjä poistettu onnistuneesti',
|
||||
'alert.success.user_restored' => 'Käyttäjä palautettu onnistuneesti',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
return array (
|
||||
return [
|
||||
'settings.system' => 'Système',
|
||||
'settings.appearance' => 'Apparence',
|
||||
'settings.miscellaneous' => 'Divers',
|
||||
|
@ -111,4 +111,4 @@ return array (
|
|||
'alert.success.user_deleted' => 'Utilisateur supprimé avec succès',
|
||||
'alert.success.user_restored' => 'Utilisateur restoré avec succès',
|
||||
|
||||
);
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Votre mot de passe a été réinitialisé!',
|
||||
'sent' => 'Nous avons envoyé votre lien de réinitialisation de mot de passe par e-mail!',
|
||||
'token' => 'Ce jeton de réinitialisation de mot de passe n\'est pas valide.',
|
||||
'user' => "Nous ne pouvons pas trouver un utilisateur avec cette adresse e-mail.",
|
||||
'user' => 'Nous ne pouvons pas trouver un utilisateur avec cette adresse e-mail.',
|
||||
|
||||
];
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'keresés',
|
||||
'settings.no_items' => 'Nincs találat',
|
||||
|
||||
|
||||
'settings.label' => 'Címke',
|
||||
'settings.value' => 'Érték',
|
||||
'settings.edit' => 'Módosítás',
|
||||
|
@ -91,7 +90,6 @@ return [
|
|||
'user.secure_front' => 'Nyilvános hozzáférés engedélyezése - Csak jelszó alkalmazása esetén.',
|
||||
'user.autologin' => 'Bejelentkezés URL-el, Link birtokában bárki bejelentkezhet.',
|
||||
|
||||
|
||||
'url' => 'URL',
|
||||
'title' => 'Cím',
|
||||
'delete' => 'Törlés',
|
||||
|
@ -117,5 +115,4 @@ return [
|
|||
'alert.success.user_deleted' => 'Felhasználó sikeresen törölve',
|
||||
'alert.success.user_restored' => 'Felhasználó sikeresen visszaállítva',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -18,6 +18,6 @@ return [
|
|||
'reset' => 'A jelszó vissza lett állítva',
|
||||
'sent' => 'A jelszó visszaállító e-mail elküldve!',
|
||||
'token' => 'A jelszó visszaállító token nem érvényes',
|
||||
'user' => "Ezzel az e-mail címmel felhasználó nem található",
|
||||
'user' => 'Ezzel az e-mail címmel felhasználó nem található',
|
||||
|
||||
];
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => '검색',
|
||||
'settings.no_items' => '항목을 찾을 수 없음',
|
||||
|
||||
|
||||
'settings.label' => '레이블',
|
||||
'settings.value' => '값',
|
||||
'settings.edit' => '편집',
|
||||
|
@ -116,5 +115,4 @@ return [
|
|||
'alert.success.user_deleted' => '사용자를 성공적으로 제거했습니다',
|
||||
'alert.success.user_restored' => '사용자를 성공적으로 복원했습니다',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => '암호가 재설정되었습니다!',
|
||||
'sent' => '암호 재설정 링크를 전자 메일로 전송했습니다!',
|
||||
'token' => '이 암호 재설정 토큰은 잘못되었습니다.',
|
||||
'user' => "해당 이메일 주소를 가진 사용자를 찾을 수 없습니다.",
|
||||
'user' => '해당 이메일 주소를 가진 사용자를 찾을 수 없습니다.',
|
||||
|
||||
];
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'Zoeken',
|
||||
'settings.no_items' => 'Geen items gevonden',
|
||||
|
||||
|
||||
'settings.label' => 'Label',
|
||||
'settings.value' => 'Waarde',
|
||||
'settings.edit' => 'Bewerken',
|
||||
|
@ -113,5 +112,4 @@ return [
|
|||
'alert.success.user_deleted' => 'Gebruiker met succes verwijderd',
|
||||
'alert.success.user_restored' => 'Gebruiker met succes hersteld',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Uw wachtwoord is opnieuw ingesteld!',
|
||||
'sent' => 'De link voor het opnieuw instellen van uw wachtwoord is naar u gemaild!',
|
||||
'token' => 'Deze token voor het opnieuw instellen van een wachtwoord is ongeldig.',
|
||||
'user' => "Er bestaat geen gebruiker met het opgegeven e-mailadres.",
|
||||
'user' => 'Er bestaat geen gebruiker met het opgegeven e-mailadres.',
|
||||
|
||||
];
|
||||
|
|
|
@ -23,7 +23,6 @@ return [
|
|||
'settings.search' => 'søk',
|
||||
'settings.no_items' => 'Ingen funn',
|
||||
|
||||
|
||||
'settings.label' => 'Merkelapp',
|
||||
'settings.value' => 'Verdi',
|
||||
'settings.edit' => 'Endre',
|
||||
|
@ -77,5 +76,4 @@ return [
|
|||
'alert.success.setting_updated' => 'Du har oppdatert denne innstillingen',
|
||||
'alert.error.not_exist' => 'Denne innstillingen eksisterer ikke.',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Passordet ditt har blitt tilbakestilt!',
|
||||
'sent' => 'Vi har sendt deg en e-post med en tilbakestillingslink for ditt passord!',
|
||||
'token' => 'Denne tilgangstoken er ikke gyldig.',
|
||||
'user' => "Vi fant ingen med den e-postadressen.",
|
||||
'user' => 'Vi fant ingen med den e-postadressen.',
|
||||
|
||||
];
|
||||
|
|
|
@ -23,7 +23,6 @@ return [
|
|||
'settings.search' => 'szukaj',
|
||||
'settings.no_items' => 'Nic nie znaleziono',
|
||||
|
||||
|
||||
'settings.label' => 'Etykieta',
|
||||
'settings.value' => 'Wartość',
|
||||
'settings.edit' => 'Edytuj',
|
||||
|
@ -77,5 +76,4 @@ return [
|
|||
'alert.success.setting_updated' => 'Ustawienie zostało zaktualizowane',
|
||||
'alert.error.not_exist' => 'Takie ustawienie nie istnieje',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'procura',
|
||||
'settings.no_items' => 'Nenhum item encontrado',
|
||||
|
||||
|
||||
'settings.label' => 'Etiqueta',
|
||||
'settings.value' => 'Valor',
|
||||
'settings.edit' => 'Editar',
|
||||
|
@ -112,5 +111,4 @@ return [
|
|||
'alert.success.user_deleted' => 'Utilizador apagada com sucesso',
|
||||
'alert.success.user_restored' => 'Utilizador restaurada com sucesso',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'A sua palavra-passe foi restabelecida!',
|
||||
'sent' => 'Enviámos-lhe por email o seu link de restauro de palavra-passe!',
|
||||
'token' => 'Este token de restabelecimento de palavra-passe é inválido.',
|
||||
'user' => "Não conseguimos encontrar nenhum utilizador com este endereço de email.",
|
||||
'user' => 'Não conseguimos encontrar nenhum utilizador com este endereço de email.',
|
||||
|
||||
];
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'найти',
|
||||
'settings.no_items' => 'Ничего не найдено',
|
||||
|
||||
|
||||
'settings.label' => 'Метка',
|
||||
'settings.value' => 'Значение',
|
||||
'settings.edit' => 'Редактировать',
|
||||
|
@ -116,5 +115,4 @@ return [
|
|||
'alert.success.user_deleted' => 'Пользователь удален успешно',
|
||||
'alert.success.user_restored' => 'Пользователь восстановлен успешно',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Ваш пароль сброшен!',
|
||||
'sent' => 'Мы отправили вам ссылку для сброса пароля!',
|
||||
'token' => 'Неверный токен для сброса пароля.',
|
||||
'user' => "Не могу найти пользователя с таким адресом e-mail.",
|
||||
'user' => 'Не могу найти пользователя с таким адресом e-mail.',
|
||||
|
||||
];
|
||||
|
|
|
@ -29,7 +29,6 @@ return [
|
|||
'settings.search' => 'išči',
|
||||
'settings.no_items' => 'Ni najdenih elementov',
|
||||
|
||||
|
||||
'settings.label' => 'Oznaka',
|
||||
'settings.value' => 'Vrednost',
|
||||
'settings.edit' => 'Uredi',
|
||||
|
@ -116,5 +115,4 @@ return [
|
|||
'alert.success.user_deleted' => 'Uporabnik uspešno izbrisan',
|
||||
'alert.success.user_restored' => 'Uporabnik uspešno obnovljen',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Tvoje geslo je bilo ponastavljeno!',
|
||||
'sent' => 'Na tvoj email smo poslali povezavo za ponastavitev gesla!',
|
||||
'token' => 'Ta ključ za ponastavitev gesla ni veljaven.',
|
||||
'user' => "Ne najdemo uporabnika s tem e-naslovom.",
|
||||
'user' => 'Ne najdemo uporabnika s tem e-naslovom.',
|
||||
|
||||
];
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<?php
|
||||
|
||||
return array (
|
||||
return [
|
||||
'settings.system' => 'Systemet',
|
||||
'settings.appearance' => 'Utseende',
|
||||
'settings.miscellaneous' => 'Övrigt',
|
||||
|
||||
|
||||
'settings.version' => 'Version',
|
||||
'settings.background_image' => 'Bakgrundsbild',
|
||||
'settings.window_target' => 'Länken öppnas i',
|
||||
|
@ -20,13 +19,11 @@ return array (
|
|||
'settings.search' => 'sök',
|
||||
'settings.no_items' => 'Inga poster hittades',
|
||||
|
||||
|
||||
'settings.label' => 'Etikett',
|
||||
'settings.value' => 'Värde',
|
||||
'settings.edit' => 'Ändra',
|
||||
'settings.view' => 'Visa',
|
||||
|
||||
|
||||
'options.none' => '- inte valt -',
|
||||
'options.google' => 'Google',
|
||||
'options.ddg' => 'DuckDuckGo',
|
||||
|
@ -36,21 +33,18 @@ return array (
|
|||
'options.yes' => 'Ja',
|
||||
'options.no' => 'Nej',
|
||||
|
||||
|
||||
'buttons.save' => 'Spara',
|
||||
'buttons.cancel' => 'Avbryt',
|
||||
'buttons.add' => 'Lägg till',
|
||||
'buttons.upload' => 'Ladda upp en fil',
|
||||
'buttons.downloadapps' => 'Uppdatera app lista',
|
||||
|
||||
|
||||
'dash.pin_item' => 'Fäst på instrumentpanelen',
|
||||
'dash.no_apps' => 'Det finns för närvarande inga fästa applikationer, :link1 eller :link2',
|
||||
'dash.link1' => 'Lägg till en applikation här',
|
||||
'dash.link2' => 'Fäst ett objekt till instrumentpanelen',
|
||||
'dash.pinned_items' => 'Fästa Objekt',
|
||||
|
||||
|
||||
'apps.app_list' => 'Applikationslista',
|
||||
'apps.view_trash' => 'Visa papperskorgen',
|
||||
'apps.add_application' => 'Lägg till applikation',
|
||||
|
@ -72,7 +66,6 @@ return array (
|
|||
'apps.override' => 'Om annan än huvudlänk',
|
||||
'apps.preview' => 'Förhandsvisa',
|
||||
|
||||
|
||||
'user.user_list' => 'Användare',
|
||||
'user.add_user' => 'Lägg till användare',
|
||||
'user.username' => 'Användarnamn',
|
||||
|
@ -82,33 +75,28 @@ return array (
|
|||
'user.secure_front' => 'Tillåt allmän åtkomst till framsidan - Upprätthålls endast om ett lösenord är satt.',
|
||||
'user.autologin' => 'Tillåt inloggning från en specifik URL. Vem som helst med länken kan logga in.',
|
||||
|
||||
|
||||
'url' => 'Url',
|
||||
'title' => 'Titel',
|
||||
'delete' => 'Radera',
|
||||
'optional' => 'Valfri',
|
||||
'restore' => 'Återställ',
|
||||
|
||||
|
||||
'alert.success.item_created' => 'Artikeln skapad',
|
||||
'alert.success.item_updated' => 'Artikeln uppdaterad',
|
||||
'alert.success.item_deleted' => 'Artikeln borttagen',
|
||||
'alert.success.item_restored' => 'Artikeln återställd',
|
||||
'alert.success.updating' => 'Uppdaterar app lista',
|
||||
|
||||
|
||||
'alert.success.tag_created' => 'Tagg skapad',
|
||||
'alert.success.tag_updated' => 'Tagg uppdaterad',
|
||||
'alert.success.tag_deleted' => 'Tagg borttagen',
|
||||
'alert.success.tag_restored' => 'Tagg återställd',
|
||||
|
||||
|
||||
'alert.success.setting_updated' => 'Inställningen uppdaterad',
|
||||
'alert.error.not_exist' => 'Denna inställning existerar inte.',
|
||||
|
||||
|
||||
'alert.success.user_created' => 'Användare skapad',
|
||||
'alert.success.user_updated' => 'Anvädare uppdaterad',
|
||||
'alert.success.user_deleted' => 'Användare borttagen',
|
||||
'alert.success.user_restored' => 'Användare återställd',
|
||||
);
|
||||
];
|
||||
|
|
|
@ -23,7 +23,6 @@ return [
|
|||
'settings.search' => 'ara',
|
||||
'settings.no_items' => 'Öğe bulunamadı',
|
||||
|
||||
|
||||
'settings.label' => 'Etiket',
|
||||
'settings.value' => 'Değer',
|
||||
'settings.edit' => 'Düzenle',
|
||||
|
@ -75,5 +74,4 @@ return [
|
|||
'alert.success.setting_updated' => 'Ayarlama kaydedildi',
|
||||
'alert.error.not_exist' => 'Böyle bir seçenek yok.',
|
||||
|
||||
|
||||
];
|
||||
|
|
|
@ -17,6 +17,6 @@ return [
|
|||
'reset' => 'Şifreniz sıfırlandı!',
|
||||
'sent' => 'Şifre sıfırlama bağlantısı eposta adresinize yollandı!',
|
||||
'token' => 'Şifre sıfırlama simgesi geçerli değil.',
|
||||
'user' => "Adresle ilişkili kullanıcı adı bulunamadı.",
|
||||
'user' => 'Adresle ilişkili kullanıcı adı bulunamadı.',
|
||||
|
||||
];
|
||||
|
|
|
@ -12,4 +12,3 @@ use Illuminate\Http\Request;
|
|||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@ Route::resources([
|
|||
'tags' => 'TagController',
|
||||
]);
|
||||
|
||||
|
||||
|
||||
Route::get('tag/{slug}', 'TagController@show')->name('tags.show');
|
||||
Route::get('tag/add/{tag}/{item}', 'TagController@add')->name('tags.add');
|
||||
Route::get('tag/restore/{id}', 'TagController@restore')->name('tags.restore');
|
||||
|
@ -59,8 +57,7 @@ Route::get('titlecolour', function (Request $request) {
|
|||
$color = $request->input('color');
|
||||
if ($color) {
|
||||
return title_color($color);
|
||||
};
|
||||
|
||||
}
|
||||
})->name('titlecolour');
|
||||
|
||||
Route::resource('users', 'UserController');
|
||||
|
@ -72,7 +69,6 @@ Route::group([
|
|||
'as' => 'settings.',
|
||||
'prefix' => 'settings',
|
||||
], function () {
|
||||
|
||||
Route::get('/', 'SettingsController@index')
|
||||
->name('index');
|
||||
Route::get('edit/{id}', 'SettingsController@edit')
|
||||
|
@ -80,9 +76,7 @@ Route::group([
|
|||
Route::get('clear/{id}', 'SettingsController@clear')
|
||||
->name('clear');
|
||||
|
||||
|
||||
Route::patch('edit/{id}', 'SettingsController@update');
|
||||
|
||||
});
|
||||
Auth::routes();
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
trait CreatesApplication
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue