DJ SneezyCheese
DJ SneezyCheese
FFilament
Created by DJ SneezyCheese on 11/11/2024 in #❓┊help
Exporter keeps returning empty file
Heh, I had to put it in a relation manager so it would return the data from there. I'm dumb. Case closed! 💗
3 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
Bump
15 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
when I ran composer update I got the attached output. I also ran the 2nd provided command which yielded successful output. On testing after this I received the same behavior as shown in the attached video. Where do I go from here?
15 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
I'm not even sure where to begin - would I be able to provide a few relevant files here perhaps? Or if you have a good suggestion of direction for me I will start going in that direction 🙏🏼
15 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
Also THANK YOU so much for your help so for and for your contributions to the community
15 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
Filament .....................................................
Packages ..... filament, forms, notifications, support, tables
Version ............................................. v3.2.115
Views ..................... PUBLISHED: filament, notifications
Filament .....................................................
Packages ..... filament, forms, notifications, support, tables
Version ............................................. v3.2.115
Views ..................... PUBLISHED: filament, notifications
15 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
I apologize I'm still Junior level so I am still understanding here - I ran composer update and nothing was available to update. Not aware of what best steps would be from here.
15 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
No it is not 🤔
15 replies
FFilament
Created by DJ SneezyCheese on 10/18/2024 in #❓┊help
Create & Add another button is closing the relation manager modal
Bump
15 replies
FFilament
Created by DJ SneezyCheese on 9/30/2024 in #❓┊help
Database notifications in database but not rendering on page
Figured it out - was missing sendToDatabase() because I'm a dummy - Thank you!!!
6 replies
FFilament
Created by DJ SneezyCheese on 9/30/2024 in #❓┊help
Database notifications in database but not rendering on page
It was already set to that - thank you 🙏🏼 Anything else I can check?
6 replies
FFilament
Created by DJ SneezyCheese on 9/23/2024 in #❓┊help
REDACTED Relation Managers not rendering on resource
going to take another approach.
7 replies
FFilament
Created by DJ SneezyCheese on 9/23/2024 in #❓┊help
REDACTED Relation Managers not rendering on resource
Bump 🙏🏼
7 replies
FFilament
Created by DJ SneezyCheese on 9/23/2024 in #❓┊help
REDACTED Relation Managers not rendering on resource
I haven't created any policies for these models. We had these 3 in place:
<?php

namespace App\Policies;

use App\Bookings\Models\Booking;
use App\User\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class BookingPolicy
{
use HandlesAuthorization;

public function viewAny(User $user): bool
{
return true;
}

public function view(User $user, Booking $booking): bool
{
return true;
}

public function create(User $user): bool
{
return false;
}

public function update(User $user, Booking $booking): bool
{
return true;
}

public function delete(User $user, Booking $booking): bool
{
return false;
}

public function restore(User $user, Booking $booking): bool
{
return false;
}

public function forceDelete(User $user, Booking $booking): bool
{
return false;
}
}
<?php

namespace App\Policies;

use App\Bookings\Models\Booking;
use App\User\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class BookingPolicy
{
use HandlesAuthorization;

public function viewAny(User $user): bool
{
return true;
}

public function view(User $user, Booking $booking): bool
{
return true;
}

public function create(User $user): bool
{
return false;
}

public function update(User $user, Booking $booking): bool
{
return true;
}

public function delete(User $user, Booking $booking): bool
{
return false;
}

public function restore(User $user, Booking $booking): bool
{
return false;
}

public function forceDelete(User $user, Booking $booking): bool
{
return false;
}
}
<?php

namespace App\Policies;

use App\Loads\Models\Load;
use App\User\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class LoadPolicy
{
use HandlesAuthorization;

public function viewAny(User $user): bool
{
return true;
}

public function view(User $user, Load $load): bool
{
return true;
}

public function create(User $user): bool
{
return false;
}

public function update(User $user, Load $load): bool
{
return true;
}

public function delete(User $user, Load $load): bool
{
return false;
}

public function restore(User $user, Load $load): bool
{
return false;
}

public function forceDelete(User $user, Load $load): bool
{
return false;
}
}
<?php

namespace App\Policies;

use App\Loads\Models\Load;
use App\User\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class LoadPolicy
{
use HandlesAuthorization;

public function viewAny(User $user): bool
{
return true;
}

public function view(User $user, Load $load): bool
{
return true;
}

public function create(User $user): bool
{
return false;
}

public function update(User $user, Load $load): bool
{
return true;
}

public function delete(User $user, Load $load): bool
{
return false;
}

public function restore(User $user, Load $load): bool
{
return false;
}

public function forceDelete(User $user, Load $load): bool
{
return false;
}
}
<?php

namespace App\Policies;

use App\Clients\Models\Client;
use App\User\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class ClientPolicy
{
use HandlesAuthorization;

/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
// Example logic: Allow super_admins to view any clients
return $user->super_admin;
}

/**
* Determine whether the user can view the model.
*/
public function view(User $user, Client $client): bool
{
// Example logic: Allow if the user is a super_admin or owns the client
return $user->super_admin || $user->id === $client->user_id;
}

/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
// Example logic: Only super_admins can create new clients
return $user->super_admin;
}

/**
* Determine whether the user can update the model.
*/
public function update(User $user, Client $client): bool
{
// Example logic: Allow if the user is a super_admin or owns the client
return $user->super_admin || $user->id === $client->user_id;
}

/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Client $client): bool
{
// Example logic: Allow if the user is a super_admin
return $user->super_admin;
}

/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Client $client): bool
{
// Example logic: Only super_admins can restore clients
return $user->super_admin;
}

/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Client $client): bool
{
// Example logic: Only super_admins can permanently delete clients
return $user->super_admin;
}
}
<?php

namespace App\Policies;

use App\Clients\Models\Client;
use App\User\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class ClientPolicy
{
use HandlesAuthorization;

/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
// Example logic: Allow super_admins to view any clients
return $user->super_admin;
}

/**
* Determine whether the user can view the model.
*/
public function view(User $user, Client $client): bool
{
// Example logic: Allow if the user is a super_admin or owns the client
return $user->super_admin || $user->id === $client->user_id;
}

/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
// Example logic: Only super_admins can create new clients
return $user->super_admin;
}

/**
* Determine whether the user can update the model.
*/
public function update(User $user, Client $client): bool
{
// Example logic: Allow if the user is a super_admin or owns the client
return $user->super_admin || $user->id === $client->user_id;
}

/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Client $client): bool
{
// Example logic: Allow if the user is a super_admin
return $user->super_admin;
}

/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Client $client): bool
{
// Example logic: Only super_admins can restore clients
return $user->super_admin;
}

/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Client $client): bool
{
// Example logic: Only super_admins can permanently delete clients
return $user->super_admin;
}
}
Would any of these affect the visibility of those relation managers?
7 replies
FFilament
Created by DJ SneezyCheese on 9/23/2024 in #❓┊help
REDACTED Relation Managers not rendering on resource
Bump for great justice. Is there anyone with insight on this?
7 replies
FFilament
Created by DJ SneezyCheese on 9/9/2024 in #❓┊help
Typed static property Filament\Resources\Pages\Page::$resource must not be accessed before...
To be clear I've ensured that protected static string $resource = ClientResource::class; is in all relevant files as far as I can tell.
3 replies
FFilament
Created by DJ SneezyCheese on 8/23/2024 in #❓┊help
Create button on relation manager just animates spinning circle one time and does not submit.
I'll keep digging - thanks for all the insight!
25 replies
FFilament
Created by DJ SneezyCheese on 8/23/2024 in #❓┊help
Create button on relation manager just animates spinning circle one time and does not submit.
My apologies for my new-ness to all of this.
25 replies
FFilament
Created by DJ SneezyCheese on 8/23/2024 in #❓┊help
Create button on relation manager just animates spinning circle one time and does not submit.
For clarity - this is not solved - I misspoke about finding a dd. I still cannot get this to function 🙃
25 replies
FFilament
Created by DJ SneezyCheese on 8/23/2024 in #❓┊help
Create button on relation manager just animates spinning circle one time and does not submit.
I stand corrected - I had a dd there with a comment - took the dd out but not the comment.
25 replies