ПIᄃK
ПIᄃK
FFilament
Created by ПIᄃK on 1/29/2024 in #❓┊help
Filament shield not in Navigation
I thought the super_admin user has all permissions. But it correct me if I’m wrong
7 replies
FFilament
Created by ПIᄃK on 1/29/2024 in #❓┊help
Filament shield not in Navigation
Yes I have the default RolePolicy:
<?php

namespace App\Policies;

use App\Models\User;
use Spatie\Permission\Models\Role;
use Illuminate\Auth\Access\HandlesAuthorization;

class RolePolicy
{
use HandlesAuthorization;

/**
* Determine whether the user can view any models.
*
* @param \App\Models\User $user
* @return \Illuminate\Auth\Access\Response|bool
*/
public function viewAny(User $user)
{
return $user->can('view_any_role');
}

/**
* Determine whether the user can view the model.
*
* @param \App\Models\User $user
* @param \Spatie\Permission\Models\Role $role
* @return \Illuminate\Auth\Access\Response|bool
*/
public function view(User $user, Role $role)
{
return $user->can('view_role');
}
...
<?php

namespace App\Policies;

use App\Models\User;
use Spatie\Permission\Models\Role;
use Illuminate\Auth\Access\HandlesAuthorization;

class RolePolicy
{
use HandlesAuthorization;

/**
* Determine whether the user can view any models.
*
* @param \App\Models\User $user
* @return \Illuminate\Auth\Access\Response|bool
*/
public function viewAny(User $user)
{
return $user->can('view_any_role');
}

/**
* Determine whether the user can view the model.
*
* @param \App\Models\User $user
* @param \Spatie\Permission\Models\Role $role
* @return \Illuminate\Auth\Access\Response|bool
*/
public function view(User $user, Role $role)
{
return $user->can('view_role');
}
...
7 replies
FFilament
Created by Nathan on 1/7/2024 in #❓┊help
Is there a way to make database notifications play sound for the $recipient?
Hello, could you publish your result? I'm facing a similar problem that im getting a. sound whena new notification appears. Thanks in advance 🙂
9 replies
FFilament
Created by ПIᄃK on 12/17/2023 in #❓┊help
Admin panel isn't loading correctly
unfortunately its still not working (same problem). My deployment script looks like this rn:
cd /home/ploi/demo.nrweb.agency

git reset --hard && git clean -df

git pull origin main
npm install
echo "" | sudo -S service php8.1-fpm reload
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

npm ci
npm run build

php artisan migrate --force
php artisan config:clear
php artisan event:clear
php artisan route:clear
php artisan view:clear

php artisan storage:link

php artisan queue:restart

echo "🚀 Application deployed!"
cd /home/ploi/demo.nrweb.agency

git reset --hard && git clean -df

git pull origin main
npm install
echo "" | sudo -S service php8.1-fpm reload
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

npm ci
npm run build

php artisan migrate --force
php artisan config:clear
php artisan event:clear
php artisan route:clear
php artisan view:clear

php artisan storage:link

php artisan queue:restart

echo "🚀 Application deployed!"
5 replies
FFilament
Created by ПIᄃK on 12/14/2023 in #❓┊help
SpatieMediaLibraryFileUpload not loading in production
Ive just changed the http to https in my .env and it worked. Im just a bit confused because its also working with http on another productive project with http in the .env but thank you so mich!
6 replies
FFilament
Created by ПIᄃK on 12/14/2023 in #❓┊help
SpatieMediaLibraryFileUpload not loading in production
No description
6 replies
FFilament
Created by ПIᄃK on 12/7/2023 in #❓┊help
Filament isn't rendering in prod
Sorry for the late response. I thought I ran npm run dev but after redeploying the app with it worked. Thank you!
4 replies