diff --git a/.env b/.env index 22dd02e..d80988b 100644 --- a/.env +++ b/.env @@ -67,3 +67,7 @@ AWS_BUCKET= AWS_USE_PATH_STYLE_ENDPOINT=false VITE_APP_NAME="${APP_NAME}" + +NEXT_CLOUD_URL=https://mkt.tunggal-pharma.com/ +NEXT_CLOUD_USERNAME=user_dev +NEXT_CLOUD_PASSWORD=userdev12345 diff --git a/.env.example b/.env.example index a1b3de4..68e96f6 100644 --- a/.env.example +++ b/.env.example @@ -64,3 +64,7 @@ AWS_BUCKET= AWS_USE_PATH_STYLE_ENDPOINT=false VITE_APP_NAME="${APP_NAME}" + +NEXT_CLOUD_URL= +NEXT_CLOUD_USERNAME= +NEXT_CLOUD_PASSWORD= diff --git a/app/Helpers/NextCloudHelper.php b/app/Helpers/NextCloudHelper.php new file mode 100644 index 0000000..cc4391e --- /dev/null +++ b/app/Helpers/NextCloudHelper.php @@ -0,0 +1,129 @@ +request('MKCOL', $url, [ + 'auth' => [$username, $password] + ]); + + return [ + 'success' => true, + 'status' => $response->getStatusCode(), + 'message' => 'Folder created successfully.' + ]; + } catch (RequestException $e) { + return [ + 'success' => false, + 'status' => $e->getCode(), + 'message' => $e->getMessage(), + ]; + } + } + + + + /** + * Create a user in Nextcloud. + * + * @param string $baseUrl Nextcloud Base URL + * @param string $adminUsername Admin Username + * @param string $adminPassword Admin Password + * @param string $userId New User ID + * @param string $password New User Password + * @param string $displayName New User Display Name + * @param string $email New User Email + * @return array Response Data + */ + public static function createUser($baseUrl, $adminUsername, $adminPassword, $userId, $password, $displayName, $email) + { + $client = new Client(); + $url = rtrim($baseUrl, '/') . "/mktia/ocs/v1.php/cloud/users"; + + try { + $response = $client->request('POST', $url, [ + 'auth' => [$adminUsername, $adminPassword], + 'headers' => [ + 'OCS-APIRequest' => 'true', + ], + 'form_params' => [ + 'userid' => $userId, + 'password' => $password, + 'displayName' => $displayName, + 'email' => $email + ] + ]); + + return [ + 'success' => true, + 'status' => $response->getStatusCode(), + 'message' => 'User created successfully.' + ]; + } catch (RequestException $e) { + return [ + 'success' => false, + 'status' => $e->getCode(), + 'message' => $e->getMessage(), + ]; + } + } + + /** + * Add a user to a group in Nextcloud. + * + * @param string $baseUrl Nextcloud Base URL + * @param string $adminUsername Admin Username + * @param string $adminPassword Admin Password + * @param string $userId New User ID + * @param string $groupName Group Name + * @return array Response Data + */ + public static function addUserToGroup($baseUrl, $adminUsername, $adminPassword, $userId, $groupName) + { + $client = new Client(); + $url = rtrim($baseUrl, '/') . "/mktia/ocs/v1.php/cloud/groups/{$groupName}"; + + try { + $response = $client->request('POST', $url, [ + 'auth' => [$adminUsername, $adminPassword], + 'headers' => [ + 'OCS-APIRequest' => 'true', + ], + 'form_params' => [ + 'userid' => $userId + ] + ]); + + return [ + 'success' => true, + 'status' => $response->getStatusCode(), + 'message' => 'User added to group successfully.' + ]; + } catch (RequestException $e) { + return [ + 'success' => false, + 'status' => $e->getCode(), + 'message' => $e->getMessage(), + ]; + } + } +} diff --git a/app/Http/Controllers/Backend/AdminsController.php b/app/Http/Controllers/Backend/AdminsController.php index bea6fa7..55825d2 100644 --- a/app/Http/Controllers/Backend/AdminsController.php +++ b/app/Http/Controllers/Backend/AdminsController.php @@ -11,6 +11,7 @@ use Illuminate\Contracts\Support\Renderable; use Illuminate\Http\RedirectResponse; use Illuminate\Support\Facades\Hash; use Spatie\Permission\Models\Role; +use App\Helpers\NextcloudHelper; class AdminsController extends Controller { @@ -63,8 +64,16 @@ class AdminsController extends Controller $admin->assignRole($request->roles); } - session()->flash('success', __('Admin has been created.')); - return redirect()->route('admin.admins.index'); + // Create a folder in Nextcloud + $response = NextcloudHelper::createUser(env('NEXT_CLOUD_URL'), env('NEXT_CLOUD_USERNAME'), env('NEXT_CLOUD_PASSWORD'), $request->username, $request->password, $request->name, $request->email); + + if ($response['success']) { + session()->flash('success', __('Admin has been created.')); + return redirect()->route('admin.admins.index'); + } else { + session()->flash('error', $response['message']); + return redirect()->route('admin.admins.index'); + } } public function edit(int $id): Renderable diff --git a/app/Http/Controllers/Master/CategoryController.php b/app/Http/Controllers/Master/CategoryController.php index 32f3d1c..8f16487 100644 --- a/app/Http/Controllers/Master/CategoryController.php +++ b/app/Http/Controllers/Master/CategoryController.php @@ -10,6 +10,7 @@ class CategoryController extends Controller { public function index() { + $this->checkAuthorization(auth()->user(), ['category.view']); return view('backend.pages.master.category.index', [ 'categories' => Kategori::all() ]); @@ -17,11 +18,13 @@ class CategoryController extends Controller public function create() { + $this->checkAuthorization(auth()->user(), ['category.create']); return view('backend.pages.master.category.create'); } public function store(Request $request) { + $this->checkAuthorization(auth()->user(), ['category.create']); $request->validate([ 'name' => 'required|unique:kategori,name', 'account_number' => 'required|unique:kategori,account_number' @@ -38,6 +41,7 @@ class CategoryController extends Controller public function edit($id) { + $this->checkAuthorization(auth()->user(), ['category.edit']); return view('backend.pages.master.category.edit', [ 'category' => Kategori::findOrfail($id) ]); @@ -45,6 +49,7 @@ class CategoryController extends Controller public function update(Request $request, $id) { + $this->checkAuthorization(auth()->user(), ['category.edit']); $request->validate([ 'name' => 'required|unique:kategori,name,' . $id . ',id', 'account_number' => 'required|unique:kategori,account_number,' . $id . ',id' @@ -61,6 +66,7 @@ class CategoryController extends Controller public function destroy($id) { + $this->checkAuthorization(auth()->user(), ['category.delete']); Kategori::findOrfail($id)->delete(); session()->flash('success', 'Category has been deleted.'); diff --git a/app/Http/Controllers/Master/CostCentreController.php b/app/Http/Controllers/Master/CostCentreController.php index 1c9bb54..93900e9 100644 --- a/app/Http/Controllers/Master/CostCentreController.php +++ b/app/Http/Controllers/Master/CostCentreController.php @@ -10,6 +10,7 @@ class CostCentreController extends Controller { public function index() { + $this->checkAuthorization(auth()->user(), ['cost.view']); return view('backend.pages.master.cost.index', [ 'costs' => CostCentre::all() ]); @@ -17,11 +18,13 @@ class CostCentreController extends Controller public function create() { + $this->checkAuthorization(auth()->user(), ['cost.create']); return view('backend.pages.master.cost.create'); } public function store(Request $request) { + $this->checkAuthorization(auth()->user(), ['cost.create']); $request->validate([ 'code' => 'required|unique:cost_centre,code', 'name' => 'required|unique:cost_centre,name' @@ -38,6 +41,7 @@ class CostCentreController extends Controller public function edit($id) { + $this->checkAuthorization(auth()->user(), ['cost.edit']); return view('backend.pages.master.cost.edit', [ 'cost' => CostCentre::findOrfail($id) ]); @@ -45,6 +49,7 @@ class CostCentreController extends Controller public function update(Request $request, $id) { + $this->checkAuthorization(auth()->user(), ['cost.edit']); $request->validate([ 'code' => 'required|unique:cost_centre,code,' . $id . ',id', 'name' => 'required|unique:cost_centre,name,' . $id . ',id' @@ -61,6 +66,7 @@ class CostCentreController extends Controller public function destroy($id) { + $this->checkAuthorization(auth()->user(), ['cost.delete']); CostCentre::findOrfail($id)->delete(); session()->flash('success', 'Cost has been deleted.'); diff --git a/app/Http/Controllers/Master/RayonController.php b/app/Http/Controllers/Master/RayonController.php index 9bdcda0..b4873bc 100644 --- a/app/Http/Controllers/Master/RayonController.php +++ b/app/Http/Controllers/Master/RayonController.php @@ -10,6 +10,7 @@ class RayonController extends Controller { public function index() { + $this->checkAuthorization(auth()->user(), ['rayon.view']); return view('backend.pages.master.rayon.index', [ 'rayons' => Rayon::all() ]); @@ -17,11 +18,13 @@ class RayonController extends Controller public function create() { + $this->checkAuthorization(auth()->user(), ['rayon.create']); return view('backend.pages.master.rayon.create'); } public function store(Request $request) { + $this->checkAuthorization(auth()->user(), ['rayon.create']); $request->validate([ 'code' => 'required|unique:rayon,code', 'name' => 'required|unique:rayon,name' @@ -38,6 +41,7 @@ class RayonController extends Controller public function edit($id) { + $this->checkAuthorization(auth()->user(), ['rayon.edit']); return view('backend.pages.master.rayon.edit', [ 'rayon' => Rayon::findOrfail($id) ]); @@ -45,6 +49,7 @@ class RayonController extends Controller public function update(Request $request, $id) { + $this->checkAuthorization(auth()->user(), ['rayon.edit']); $request->validate([ 'code' => 'required|unique:rayon,code,' . $id . ',id', 'name' => 'required|unique:rayon,name,' . $id . ',id' @@ -61,6 +66,7 @@ class RayonController extends Controller public function destroy($id) { + $this->checkAuthorization(auth()->user(), ['rayon.delete']); Rayon::findOrfail($id)->delete(); session()->flash('success', 'Rayon has been deleted.'); diff --git a/composer.json b/composer.json index 953ada5..8a819be 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "laravel/tinker": "^2.9", "laravel/ui": "^4.6", "laravolt/avatar": "^6.0", + "nino/laravel-nextcloud-fs": "^2.0", "phpoffice/phpspreadsheet": "^3.5", "spatie/laravel-html": "^3.11", "spatie/laravel-menu": "^4.2", diff --git a/composer.lock b/composer.lock index d12574e..4b406ec 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cf881aac397fa25bc97a79859f5d7e61", + "content-hash": "e20816a5ac8758dcf14572597c4d7627", "packages": [ { "name": "barryvdh/laravel-dompdf", @@ -457,16 +457,16 @@ }, { "name": "dompdf/dompdf", - "version": "v3.0.0", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "fbc7c5ee5d94f7a910b78b43feb7931b7f971b59" + "reference": "2d622faf9aa1f8f7f24dd094e49b5cf6c0c5d4e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/fbc7c5ee5d94f7a910b78b43feb7931b7f971b59", - "reference": "fbc7c5ee5d94f7a910b78b43feb7931b7f971b59", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/2d622faf9aa1f8f7f24dd094e49b5cf6c0c5d4e6", + "reference": "2d622faf9aa1f8f7f24dd094e49b5cf6c0c5d4e6", "shasum": "" }, "require": { @@ -515,22 +515,22 @@ "homepage": "https://github.com/dompdf/dompdf", "support": { "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/v3.0.0" + "source": "https://github.com/dompdf/dompdf/tree/v3.0.1" }, - "time": "2024-04-29T14:01:28+00:00" + "time": "2024-12-05T14:59:38+00:00" }, { "name": "dompdf/php-font-lib", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/dompdf/php-font-lib.git", - "reference": "991d6a954f6bbd7e41022198f00586b230731441" + "reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/991d6a954f6bbd7e41022198f00586b230731441", - "reference": "991d6a954f6bbd7e41022198f00586b230731441", + "url": "https://api.github.com/repos/dompdf/php-font-lib/zipball/6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d", + "reference": "6137b7d4232b7f16c882c75e4ca3991dbcf6fe2d", "shasum": "" }, "require": { @@ -560,9 +560,9 @@ "homepage": "https://github.com/dompdf/php-font-lib", "support": { "issues": "https://github.com/dompdf/php-font-lib/issues", - "source": "https://github.com/dompdf/php-font-lib/tree/1.0.0" + "source": "https://github.com/dompdf/php-font-lib/tree/1.0.1" }, - "time": "2024-04-29T13:40:38+00:00" + "time": "2024-12-02T14:37:59+00:00" }, { "name": "dompdf/php-svg-lib", @@ -1432,16 +1432,16 @@ }, { "name": "laravel/framework", - "version": "v11.34.2", + "version": "v11.35.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "865da6d73dd353f07a7bcbd778c55966a620121f" + "reference": "dcfa130ede1a6fa4343dc113410963e791ad34fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/865da6d73dd353f07a7bcbd778c55966a620121f", - "reference": "865da6d73dd353f07a7bcbd778c55966a620121f", + "url": "https://api.github.com/repos/laravel/framework/zipball/dcfa130ede1a6fa4343dc113410963e791ad34fb", + "reference": "dcfa130ede1a6fa4343dc113410963e791ad34fb", "shasum": "" }, "require": { @@ -1465,6 +1465,7 @@ "league/commonmark": "^2.2.1", "league/flysystem": "^3.25.1", "league/flysystem-local": "^3.25.1", + "league/uri": "^7.5.1", "monolog/monolog": "^3.0", "nesbot/carbon": "^2.72.2|^3.4", "nunomaduro/termwind": "^2.0", @@ -1548,9 +1549,9 @@ "league/flysystem-read-only": "^3.25.1", "league/flysystem-sftp-v3": "^3.25.1", "mockery/mockery": "^1.6.10", - "nyholm/psr7": "^1.2", "orchestra/testbench-core": "^9.6", "pda/pheanstalk": "^5.0.6", + "php-http/discovery": "^1.15", "phpstan/phpstan": "^1.11.5", "phpunit/phpunit": "^10.5.35|^11.3.6", "predis/predis": "^2.3", @@ -1582,8 +1583,8 @@ "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", "mockery/mockery": "Required to use mocking (^1.6).", - "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", "phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).", "predis/predis": "Required to use the predis connector (^2.3).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", @@ -1604,6 +1605,7 @@ }, "autoload": { "files": [ + "src/Illuminate/Collections/functions.php", "src/Illuminate/Collections/helpers.php", "src/Illuminate/Events/functions.php", "src/Illuminate/Filesystem/functions.php", @@ -1641,7 +1643,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-11-27T15:43:57+00:00" + "time": "2024-12-12T18:25:58+00:00" }, { "name": "laravel/prompts", @@ -1926,16 +1928,16 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - }, "laravel": { - "providers": [ - "Laravolt\\Avatar\\ServiceProvider" - ], "aliases": { "Avatar": "Laravolt\\Avatar\\Facade" - } + }, + "providers": [ + "Laravolt\\Avatar\\ServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "6.0-dev" } }, "autoload": { @@ -1985,16 +1987,16 @@ }, { "name": "league/commonmark", - "version": "2.5.3", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "b650144166dfa7703e62a22e493b853b58d874b0" + "reference": "d150f911e0079e90ae3c106734c93137c184f932" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/b650144166dfa7703e62a22e493b853b58d874b0", - "reference": "b650144166dfa7703e62a22e493b853b58d874b0", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d150f911e0079e90ae3c106734c93137c184f932", + "reference": "d150f911e0079e90ae3c106734c93137c184f932", "shasum": "" }, "require": { @@ -2019,8 +2021,9 @@ "phpstan/phpstan": "^1.8.2", "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0 || ^7.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0", + "symfony/finder": "^5.3 | ^6.0 | ^7.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0", "unleashedtech/php-coding-standard": "^3.1.1", "vimeo/psalm": "^4.24.0 || ^5.0.0" }, @@ -2030,7 +2033,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.6-dev" + "dev-main": "2.7-dev" } }, "autoload": { @@ -2087,7 +2090,7 @@ "type": "tidelift" } ], - "time": "2024-08-16T11:46:16+00:00" + "time": "2024-12-07T15:34:16+00:00" }, { "name": "league/config", @@ -2303,6 +2306,54 @@ }, "time": "2024-08-09T21:24:39+00:00" }, + { + "name": "league/flysystem-webdav", + "version": "3.29.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-webdav.git", + "reference": "08bea4cad465a3751410614fc777f62e8c96a8e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-webdav/zipball/08bea4cad465a3751410614fc777f62e8c96a8e5", + "reference": "08bea4cad465a3751410614fc777f62e8c96a8e5", + "shasum": "" + }, + "require": { + "league/flysystem": "^3.6.0", + "php": "^8.0.2", + "sabre/dav": "^4.6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\WebDAV\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "WebDAV filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "WebDAV", + "file", + "files", + "filesystem" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-webdav/tree/3.29.0" + }, + "time": "2024-08-09T21:24:39+00:00" + }, { "name": "league/mime-type-detection", "version": "1.16.0", @@ -2359,6 +2410,180 @@ ], "time": "2024-09-21T08:32:55+00:00" }, + { + "name": "league/uri", + "version": "7.5.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "81fb5145d2644324614cc532b28efd0215bda430" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", + "reference": "81fb5145d2644324614cc532b28efd0215bda430", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.5", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.5.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:40:02+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.5.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" + }, + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.5.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:18:47+00:00" + }, { "name": "maennchen/zipstream-php", "version": "3.1.1", @@ -2612,16 +2837,16 @@ }, { "name": "monolog/monolog", - "version": "3.8.0", + "version": "3.8.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "32e515fdc02cdafbe4593e30a9350d486b125b67" + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/32e515fdc02cdafbe4593e30a9350d486b125b67", - "reference": "32e515fdc02cdafbe4593e30a9350d486b125b67", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", "shasum": "" }, "require": { @@ -2699,7 +2924,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.8.0" + "source": "https://github.com/Seldaek/monolog/tree/3.8.1" }, "funding": [ { @@ -2711,7 +2936,7 @@ "type": "tidelift" } ], - "time": "2024-11-12T13:57:08+00:00" + "time": "2024-12-05T17:15:07+00:00" }, { "name": "nesbot/carbon", @@ -3025,6 +3250,61 @@ }, "time": "2024-10-08T18:51:32+00:00" }, + { + "name": "nino/laravel-nextcloud-fs", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/treyssatvincent/laravel-nextcloud-fs.git", + "reference": "175ab3b266adc13985148b22cbde286f16c541dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/treyssatvincent/laravel-nextcloud-fs/zipball/175ab3b266adc13985148b22cbde286f16c541dd", + "reference": "175ab3b266adc13985148b22cbde286f16c541dd", + "shasum": "" + }, + "require": { + "illuminate/filesystem": "^10.38 || ^11.21.0", + "league/flysystem-webdav": "^3.28", + "php": "^8.2", + "sabre/uri": ">=2.2.2" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.62", + "orchestra/testbench": "^8.18 || ^9.3", + "phpstan/phpstan": "^1.11", + "phpunit/phpunit": "^10.1 || ^9.6" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Nino\\FilesystemProviders\\NextcloudServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Nino\\FilesystemProviders\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Laravel Nextcloud Filesystem", + "keywords": [ + "filesystem", + "laravel", + "nextcloud" + ], + "support": { + "issues": "https://github.com/treyssatvincent/laravel-nextcloud-fs/issues", + "source": "https://github.com/treyssatvincent/laravel-nextcloud-fs" + }, + "time": "2024-08-25T13:02:17+00:00" + }, { "name": "nunomaduro/termwind", "version": "v2.3.0", @@ -3114,16 +3394,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "fb74dcdfa5b538763ab980e977529bc783039aec" + "reference": "bce5db99872f9613121c3ad033c43318a3789396" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fb74dcdfa5b538763ab980e977529bc783039aec", - "reference": "fb74dcdfa5b538763ab980e977529bc783039aec", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/bce5db99872f9613121c3ad033c43318a3789396", + "reference": "bce5db99872f9613121c3ad033c43318a3789396", "shasum": "" }, "require": { @@ -3157,7 +3437,7 @@ "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^9.6 || ^10.5", + "phpunit/phpunit": "^10.5", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, @@ -3212,9 +3492,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/3.5.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/3.6.0" }, - "time": "2024-11-22T06:41:00+00:00" + "time": "2024-12-08T15:04:12+00:00" }, { "name": "phpoption/phpoption", @@ -3705,16 +3985,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.5", + "version": "v0.12.7", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "36a03ff27986682c22985e56aabaf840dd173cb5" + "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/36a03ff27986682c22985e56aabaf840dd173cb5", - "reference": "36a03ff27986682c22985e56aabaf840dd173cb5", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", + "reference": "d73fa3c74918ef4522bb8a3bf9cab39161c4b57c", "shasum": "" }, "require": { @@ -3778,9 +4058,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.5" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.7" }, - "time": "2024-11-29T06:14:30+00:00" + "time": "2024-12-10T01:58:33+00:00" }, { "name": "ralouphie/getallheaders", @@ -4072,6 +4352,451 @@ }, "time": "2024-10-27T17:38:32+00:00" }, + { + "name": "sabre/dav", + "version": "4.7.0", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/dav.git", + "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/dav/zipball/074373bcd689a30bcf5aaa6bbb20a3395964ce7a", + "reference": "074373bcd689a30bcf5aaa6bbb20a3395964ce7a", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-date": "*", + "ext-dom": "*", + "ext-iconv": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "ext-spl": "*", + "lib-libxml": ">=2.7.0", + "php": "^7.1.0 || ^8.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "sabre/event": "^5.0", + "sabre/http": "^5.0.5", + "sabre/uri": "^2.0", + "sabre/vobject": "^4.2.1", + "sabre/xml": "^2.0.1" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "monolog/monolog": "^1.27 || ^2.0", + "phpstan/phpstan": "^0.12 || ^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" + }, + "suggest": { + "ext-curl": "*", + "ext-imap": "*", + "ext-pdo": "*" + }, + "bin": [ + "bin/sabredav", + "bin/naturalselection" + ], + "type": "library", + "autoload": { + "psr-4": { + "Sabre\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "WebDAV Framework for PHP", + "homepage": "http://sabre.io/", + "keywords": [ + "CalDAV", + "CardDAV", + "WebDAV", + "framework", + "iCalendar" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/dav/issues", + "source": "https://github.com/fruux/sabre-dav" + }, + "time": "2024-10-29T11:46:02+00:00" + }, + { + "name": "sabre/event", + "version": "5.1.7", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/event.git", + "reference": "86d57e305c272898ba3c28e9bd3d65d5464587c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/event/zipball/86d57e305c272898ba3c28e9bd3d65d5464587c2", + "reference": "86d57e305c272898ba3c28e9bd3d65d5464587c2", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1||^3.63", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" + }, + "type": "library", + "autoload": { + "files": [ + "lib/coroutine.php", + "lib/Loop/functions.php", + "lib/Promise/functions.php" + ], + "psr-4": { + "Sabre\\Event\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "sabre/event is a library for lightweight event-based programming", + "homepage": "http://sabre.io/event/", + "keywords": [ + "EventEmitter", + "async", + "coroutine", + "eventloop", + "events", + "hooks", + "plugin", + "promise", + "reactor", + "signal" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/event/issues", + "source": "https://github.com/fruux/sabre-event" + }, + "time": "2024-08-27T11:23:05+00:00" + }, + { + "name": "sabre/http", + "version": "5.1.12", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/http.git", + "reference": "dedff73f3995578bc942fa4c8484190cac14f139" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/http/zipball/dedff73f3995578bc942fa4c8484190cac14f139", + "reference": "dedff73f3995578bc942fa4c8484190cac14f139", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-curl": "*", + "ext-mbstring": "*", + "php": "^7.1 || ^8.0", + "sabre/event": ">=4.0 <6.0", + "sabre/uri": "^2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1||^3.63", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" + }, + "suggest": { + "ext-curl": " to make http requests with the Client class" + }, + "type": "library", + "autoload": { + "files": [ + "lib/functions.php" + ], + "psr-4": { + "Sabre\\HTTP\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "The sabre/http library provides utilities for dealing with http requests and responses. ", + "homepage": "https://github.com/fruux/sabre-http", + "keywords": [ + "http" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/http/issues", + "source": "https://github.com/fruux/sabre-http" + }, + "time": "2024-08-27T16:07:41+00:00" + }, + { + "name": "sabre/uri", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/uri.git", + "reference": "b76524c22de90d80ca73143680a8e77b1266c291" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/uri/zipball/b76524c22de90d80ca73143680a8e77b1266c291", + "reference": "b76524c22de90d80ca73143680a8e77b1266c291", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.63", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^1.12", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-strict-rules": "^1.6", + "phpunit/phpunit": "^9.6" + }, + "type": "library", + "autoload": { + "files": [ + "lib/functions.php" + ], + "psr-4": { + "Sabre\\Uri\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "Functions for making sense out of URIs.", + "homepage": "http://sabre.io/uri/", + "keywords": [ + "rfc3986", + "uri", + "url" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/uri/issues", + "source": "https://github.com/fruux/sabre-uri" + }, + "time": "2024-08-27T12:18:16+00:00" + }, + { + "name": "sabre/vobject", + "version": "4.5.6", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/vobject.git", + "reference": "900266bb3bd448a9f7f41f82344ad0aba237cb27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/vobject/zipball/900266bb3bd448a9f7f41f82344ad0aba237cb27", + "reference": "900266bb3bd448a9f7f41f82344ad0aba237cb27", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1 || ^8.0", + "sabre/xml": "^2.1 || ^3.0 || ^4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1", + "phpstan/phpstan": "^0.12 || ^1.11", + "phpunit/php-invoker": "^2.0 || ^3.1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" + }, + "suggest": { + "hoa/bench": "If you would like to run the benchmark scripts" + }, + "bin": [ + "bin/vobject", + "bin/generate_vcards" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sabre\\VObject\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + }, + { + "name": "Dominik Tobschall", + "email": "dominik@fruux.com", + "homepage": "http://tobschall.de/", + "role": "Developer" + }, + { + "name": "Ivan Enderlin", + "email": "ivan.enderlin@hoa-project.net", + "homepage": "http://mnt.io/", + "role": "Developer" + } + ], + "description": "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects", + "homepage": "http://sabre.io/vobject/", + "keywords": [ + "availability", + "freebusy", + "iCalendar", + "ical", + "ics", + "jCal", + "jCard", + "recurrence", + "rfc2425", + "rfc2426", + "rfc2739", + "rfc4770", + "rfc5545", + "rfc5546", + "rfc6321", + "rfc6350", + "rfc6351", + "rfc6474", + "rfc6638", + "rfc6715", + "rfc6868", + "vCalendar", + "vCard", + "vcf", + "xCal", + "xCard" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/vobject/issues", + "source": "https://github.com/fruux/sabre-vobject" + }, + "time": "2024-10-14T11:53:54+00:00" + }, + { + "name": "sabre/xml", + "version": "2.2.11", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/xml.git", + "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/xml/zipball/01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc", + "reference": "01a7927842abf3e10df3d9c2d9b0cc9d813a3fcc", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "lib-libxml": ">=2.6.20", + "php": "^7.1 || ^8.0", + "sabre/uri": ">=1.0,<3.0.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1||3.63.2", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" + }, + "type": "library", + "autoload": { + "files": [ + "lib/Deserializer/functions.php", + "lib/Serializer/functions.php" + ], + "psr-4": { + "Sabre\\Xml\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + }, + { + "name": "Markus Staab", + "email": "markus.staab@redaxo.de", + "role": "Developer" + } + ], + "description": "sabre/xml is an XML library that you may not hate.", + "homepage": "https://sabre.io/xml/", + "keywords": [ + "XMLReader", + "XMLWriter", + "dom", + "xml" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/xml/issues", + "source": "https://github.com/fruux/sabre-xml" + }, + "time": "2024-09-06T07:37:46+00:00" + }, { "name": "spatie/laravel-html", "version": "3.11.1", @@ -4559,16 +5284,16 @@ }, { "name": "symfony/console", - "version": "v7.2.0", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf" + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", - "reference": "23c8aae6d764e2bae02d2a99f7532a7f6ed619cf", + "url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3", + "reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3", "shasum": "" }, "require": { @@ -4632,7 +5357,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.0" + "source": "https://github.com/symfony/console/tree/v7.2.1" }, "funding": [ { @@ -4648,7 +5373,7 @@ "type": "tidelift" } ], - "time": "2024-11-06T14:24:19+00:00" + "time": "2024-12-11T03:49:26+00:00" }, { "name": "symfony/css-selector", @@ -4784,16 +5509,16 @@ }, { "name": "symfony/error-handler", - "version": "v7.2.0", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "672b3dd1ef8b87119b446d67c58c106c43f965fe" + "reference": "6150b89186573046167796fa5f3f76601d5145f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/672b3dd1ef8b87119b446d67c58c106c43f965fe", - "reference": "672b3dd1ef8b87119b446d67c58c106c43f965fe", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/6150b89186573046167796fa5f3f76601d5145f8", + "reference": "6150b89186573046167796fa5f3f76601d5145f8", "shasum": "" }, "require": { @@ -4839,7 +5564,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.2.0" + "source": "https://github.com/symfony/error-handler/tree/v7.2.1" }, "funding": [ { @@ -4855,7 +5580,7 @@ "type": "tidelift" } ], - "time": "2024-11-05T15:35:02+00:00" + "time": "2024-12-07T08:50:44+00:00" }, { "name": "symfony/event-dispatcher", @@ -5157,16 +5882,16 @@ }, { "name": "symfony/http-kernel", - "version": "v7.2.0", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "6b4722a25e0aed1ccb4914b9bcbd493cc4676b4d" + "reference": "d8ae58eecae44c8e66833e76cc50a4ad3c002d97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6b4722a25e0aed1ccb4914b9bcbd493cc4676b4d", - "reference": "6b4722a25e0aed1ccb4914b9bcbd493cc4676b4d", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d8ae58eecae44c8e66833e76cc50a4ad3c002d97", + "reference": "d8ae58eecae44c8e66833e76cc50a4ad3c002d97", "shasum": "" }, "require": { @@ -5251,7 +5976,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.2.0" + "source": "https://github.com/symfony/http-kernel/tree/v7.2.1" }, "funding": [ { @@ -5267,7 +5992,7 @@ "type": "tidelift" } ], - "time": "2024-11-29T08:42:40+00:00" + "time": "2024-12-11T12:09:10+00:00" }, { "name": "symfony/mailer", @@ -5351,16 +6076,16 @@ }, { "name": "symfony/mime", - "version": "v7.2.0", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "cc84a4b81f62158c3846ac7ff10f696aae2b524d" + "reference": "7f9617fcf15cb61be30f8b252695ed5e2bfac283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/cc84a4b81f62158c3846ac7ff10f696aae2b524d", - "reference": "cc84a4b81f62158c3846ac7ff10f696aae2b524d", + "url": "https://api.github.com/repos/symfony/mime/zipball/7f9617fcf15cb61be30f8b252695ed5e2bfac283", + "reference": "7f9617fcf15cb61be30f8b252695ed5e2bfac283", "shasum": "" }, "require": { @@ -5415,7 +6140,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.2.0" + "source": "https://github.com/symfony/mime/tree/v7.2.1" }, "funding": [ { @@ -5431,7 +6156,7 @@ "type": "tidelift" } ], - "time": "2024-11-23T09:19:39+00:00" + "time": "2024-12-07T08:50:44+00:00" }, { "name": "symfony/polyfill-ctype", @@ -5459,8 +6184,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5535,8 +6260,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5614,8 +6339,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5696,8 +6421,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5780,8 +6505,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5854,8 +6579,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5934,8 +6659,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6016,8 +6741,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -7292,13 +8017,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - }, "laravel": { "providers": [ "Laravel\\Pail\\PailServiceProvider" ] + }, + "branch-alias": { + "dev-main": "1.x-dev" } }, "autoload": { @@ -7823,16 +8548,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "11.0.7", + "version": "11.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca" + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7f08030e8811582cc459871d28d6f5a1a4d35ca", - "reference": "f7f08030e8811582cc459871d28d6f5a1a4d35ca", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/418c59fd080954f8c4aa5631d9502ecda2387118", + "reference": "418c59fd080954f8c4aa5631d9502ecda2387118", "shasum": "" }, "require": { @@ -7851,7 +8576,7 @@ "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^11.4.1" + "phpunit/phpunit": "^11.5.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -7889,7 +8614,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.8" }, "funding": [ { @@ -7897,7 +8622,7 @@ "type": "github" } ], - "time": "2024-10-09T06:21:38+00:00" + "time": "2024-12-11T12:34:27+00:00" }, { "name": "phpunit/php-file-iterator", @@ -8146,16 +8871,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.4.4", + "version": "11.5.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f9ba7bd3c9f3ff54ec379d7a1c2e3f13fe0bbde4" + "reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f9ba7bd3c9f3ff54ec379d7a1c2e3f13fe0bbde4", - "reference": "f9ba7bd3c9f3ff54ec379d7a1c2e3f13fe0bbde4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2b94d4f2450b9869fa64a46fd8a6a41997aef56a", + "reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a", "shasum": "" }, "require": { @@ -8179,11 +8904,12 @@ "sebastian/comparator": "^6.2.1", "sebastian/diff": "^6.0.2", "sebastian/environment": "^7.2.0", - "sebastian/exporter": "^6.1.3", + "sebastian/exporter": "^6.3.0", "sebastian/global-state": "^7.0.2", "sebastian/object-enumerator": "^6.0.1", "sebastian/type": "^5.1.0", - "sebastian/version": "^5.0.2" + "sebastian/version": "^5.0.2", + "staabm/side-effects-detector": "^1.0.5" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -8194,7 +8920,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "11.4-dev" + "dev-main": "11.5-dev" } }, "autoload": { @@ -8226,7 +8952,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.4.4" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.1" }, "funding": [ { @@ -8242,7 +8968,7 @@ "type": "tidelift" } ], - "time": "2024-11-27T10:44:52+00:00" + "time": "2024-12-11T10:52:48+00:00" }, { "name": "sebastian/cli-parser", @@ -8303,23 +9029,23 @@ }, { "name": "sebastian/code-unit", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "6bb7d09d6623567178cf54126afa9c2310114268" + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268", - "reference": "6bb7d09d6623567178cf54126afa9c2310114268", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", + "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca", "shasum": "" }, "require": { "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^11.0" + "phpunit/phpunit": "^11.5" }, "type": "library", "extra": { @@ -8348,7 +9074,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", "security": "https://github.com/sebastianbergmann/code-unit/security/policy", - "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2" }, "funding": [ { @@ -8356,7 +9082,7 @@ "type": "github" } ], - "time": "2024-07-03T04:44:28+00:00" + "time": "2024-12-12T09:59:06+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -8682,16 +9408,16 @@ }, { "name": "sebastian/exporter", - "version": "6.1.3", + "version": "6.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e" + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", - "reference": "c414673eee9a8f9d51bbf8d61fc9e3ef1e85b20e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3", + "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3", "shasum": "" }, "require": { @@ -8700,7 +9426,7 @@ "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^11.2" + "phpunit/phpunit": "^11.3" }, "type": "library", "extra": { @@ -8748,7 +9474,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/6.1.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0" }, "funding": [ { @@ -8756,7 +9482,7 @@ "type": "github" } ], - "time": "2024-07-03T04:56:19+00:00" + "time": "2024-12-05T09:17:50+00:00" }, { "name": "sebastian/global-state", @@ -9167,6 +9893,58 @@ ], "time": "2024-10-09T05:16:32+00:00" }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, { "name": "symfony/yaml", "version": "v7.2.0", @@ -9292,12 +10070,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.2" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/config/filesystems.php b/config/filesystems.php index b564035..2ac1540 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -57,6 +57,14 @@ return [ 'throw' => false, ], + 'nextcloud' => [ + 'driver' => 'nextcloud', + 'baseUri' => env('NEXT_CLOUD_URL'), + 'userName' => env('NEXT_CLOUD_USERNAME'), + 'password' => env('NEXT_CLOUD_PASSWORD'), + 'directory' => '', + ], + ], /* diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index ca5eeca..871b6cb 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -6,6 +6,7 @@ use Database\Seeds\AdminSeeder; use Database\Seeds\RolePermissionSeeder; use Database\Seeds\MenuSeeder; use Database\Seeds\RayonSeeder; +use Database\Seeds\RolePermissionSeeder2; class DatabaseSeeder extends Seeder { @@ -21,5 +22,6 @@ class DatabaseSeeder extends Seeder $this->call(RolePermissionSeeder::class); $this->call(MenuSeeder::class); $this->call(RayonSeeder::class); + $this->call(RolePermissionSeeder2::class); } } diff --git a/database/seeds/RolePermissionSeeder.php b/database/seeds/RolePermissionSeeder.php index b1e451d..06c31cf 100644 --- a/database/seeds/RolePermissionSeeder.php +++ b/database/seeds/RolePermissionSeeder.php @@ -38,7 +38,6 @@ class RolePermissionSeeder extends Seeder // Permission List as array $permissions = [ - [ 'group_name' => 'dashboard', 'permissions' => [ @@ -80,9 +79,6 @@ class RolePermissionSeeder extends Seeder ], ]; - - - // Do same for the admin guard for tutorial purposes. $admin = Admin::where('username', 'superadmin')->first(); $roleSuperAdmin = $this->maybeCreateSuperAdminRole($admin); diff --git a/database/seeds/RolePermissionSeeder2.php b/database/seeds/RolePermissionSeeder2.php new file mode 100644 index 0000000..fe2bcb7 --- /dev/null +++ b/database/seeds/RolePermissionSeeder2.php @@ -0,0 +1,103 @@ + 'rayon', + 'permissions' => [ + 'rayon.view', + 'rayon.edit', + 'rayon.create', + 'rayon.delete', + ] + ], + [ + 'group_name' => 'cost', + 'permissions' => [ + 'cost.view', + 'cost.edit', + 'cost.create', + 'cost.delete', + ] + ], + [ + 'group_name' => 'category', + 'permissions' => [ + 'category.view', + 'category.edit', + 'category.create', + 'category.delete', + ] + ], + ]; + + // Do same for the admin guard for tutorial purposes. + $admin = Admin::where('username', 'superadmin')->first(); + $roleSuperAdmin = $this->maybeCreateSuperAdminRole($admin); + + // Create and Assign Permissions + for ($i = 0; $i < count($permissions); $i++) { + $permissionGroup = $permissions[$i]['group_name']; + for ($j = 0; $j < count($permissions[$i]['permissions']); $j++) { + $permissionExist = Permission::where('name', $permissions[$i]['permissions'][$j])->first(); + if (is_null($permissionExist)) { + $permission = Permission::create( + [ + 'name' => $permissions[$i]['permissions'][$j], + 'group_name' => $permissionGroup, + 'guard_name' => 'admin' + ] + ); + $roleSuperAdmin->givePermissionTo($permission); + $permission->assignRole($roleSuperAdmin); + } + } + } + + // Assign super admin role permission to superadmin user + if ($admin) { + $admin->assignRole($roleSuperAdmin); + } + } + + private function maybeCreateSuperAdminRole($admin): Role + { + if (is_null($admin)) { + $roleSuperAdmin = Role::create(['name' => 'superadmin', 'guard_name' => 'admin']); + } else { + $roleSuperAdmin = Role::where('name', 'superadmin')->where('guard_name', 'admin')->first(); + } + + if (is_null($roleSuperAdmin)) { + $roleSuperAdmin = Role::create(['name' => 'superadmin', 'guard_name' => 'admin']); + } + + return $roleSuperAdmin; + } +} diff --git a/resources/views/backend/pages/master/category/index.blade.php b/resources/views/backend/pages/master/category/index.blade.php index 46a6317..549e40b 100644 --- a/resources/views/backend/pages/master/category/index.blade.php +++ b/resources/views/backend/pages/master/category/index.blade.php @@ -26,9 +26,11 @@

List Data Category

- - Add New Category - + @if (Auth::user()->can('category.create')) + + Add New Category + + @endif

diff --git a/resources/views/backend/pages/master/cost/index.blade.php b/resources/views/backend/pages/master/cost/index.blade.php index ead7f8a..6f56b00 100644 --- a/resources/views/backend/pages/master/cost/index.blade.php +++ b/resources/views/backend/pages/master/cost/index.blade.php @@ -26,9 +26,11 @@

List Data Cost Centre

- - Add New Cost Centre - + @if (Auth::user()->can('cost.create')) + + Add New Cost Centre + + @endif

diff --git a/resources/views/backend/pages/master/rayon/index.blade.php b/resources/views/backend/pages/master/rayon/index.blade.php index ed5840e..6282af8 100644 --- a/resources/views/backend/pages/master/rayon/index.blade.php +++ b/resources/views/backend/pages/master/rayon/index.blade.php @@ -26,9 +26,11 @@

List Data Rayon

- - Add New Rayon - + @if (Auth::user()->can('rayon.create')) + + Add New Rayon + + @endif