Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/media gallery #15

Merged
merged 14 commits into from
Dec 31, 2023
Merged
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling
commit_message: Fix styling by bot
branch: ${{ github.head_ref }}
2 changes: 1 addition & 1 deletion .php-cs-fixer.cache

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions app/Http/Controllers/Admin/NotificationController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class NotificationController extends Controller
{
public function markNotification(Request $request)
{
auth()->user()
->unreadNotifications
->when($request->input('id'), function ($query) use ($request)
{
return $query->where('id', $request->input('id'));
})
->markAsRead();

return response()->noContent();
}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "anisaronno/laravel-starter",
"type": "project",
"version": "0.0.2",
"version": "0.0.3",
"description": "A perfect laravel starter project for any kind of project.",
"keywords": [
"laravel",
Expand All @@ -19,7 +19,7 @@
],
"require": {
"php": "^8.1",
"anisaronno/laravel-media-gallery": "0.2.0",
"anisaronno/laravel-media-gallery": "0.3.0",
"anisaronno/laravel-settings": "1.0.0",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions config/gallery.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

return [
'cache_expiry_time' => 1440,
'guard' => ['auth:api'],
'batch_delete_secret' => '1a463c2c-81b0-441e-9e4f-04691a7e5e0f',
'view_all_media_anyone' => false,
];
29 changes: 29 additions & 0 deletions database/seeders/RolePermissionSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ private function createRolesAndPermissions()
],
],

[
'group_name' => 'media',
'permissions' => [
'media.create',
'media.view',
'media.edit',
'media.delete',
'media.status',
],
],

[
'group_name' => 'category',
'permissions' => [
Expand Down Expand Up @@ -267,6 +278,12 @@ private function assignPermissionsToRoles()
'role.delete',
'role.status',

'media.create',
'media.view',
'media.edit',
'media.delete',
'media.status',

'category.create',
'category.view',
'category.edit',
Expand Down Expand Up @@ -343,6 +360,12 @@ private function assignPermissionsToRoles()
'admin' => [
'dashboard.view',

'media.create',
'media.view',
'media.edit',
'media.delete',
'media.status',

'blog.create',
'blog.view',
'blog.edit',
Expand Down Expand Up @@ -424,6 +447,12 @@ private function assignPermissionsToRoles()
'editor' => [
'dashboard.view',

'media.create',
'media.view',
'media.edit',
'media.delete',
'media.status',

'blog.create',
'blog.view',
'blog.edit',
Expand Down
1 change: 1 addition & 0 deletions public/build/assets/app-7IyCsEX6.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resources/css/app.css": {
"file": "assets/app-aUp0Sp7t.css",
"file": "assets/app-7IyCsEX6.css",
"isEntry": true,
"src": "resources/css/app.css"
},
Expand Down
Loading