BakaPresident
BakaPresident
Explore posts from servers
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
Ahh okay... It's okay i'll just return a query that always return false
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
okay so must i do like $query = null then return $query;?
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
I tried debugging it. It seems to know to go to the return null portion but for some reason it still returns the entire table (i.e return $query)
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
Sorry quick question. I have the following code now
->modifyQueryUsing(function (Builder $query) {
if (Auth::user()->hasRole(['general-admin'])) {
return $query;
} else if (Auth::user()->hasRole(['wheelchair-admin'])) {
return $query->where('bus_type', BusOrderType::Wheelchair);
} else {
return null;
}
})
->modifyQueryUsing(function (Builder $query) {
if (Auth::user()->hasRole(['general-admin'])) {
return $query;
} else if (Auth::user()->hasRole(['wheelchair-admin'])) {
return $query->where('bus_type', BusOrderType::Wheelchair);
} else {
return null;
}
})
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
ahh okay thanks!
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
Using the table function right? Does Policy work the same? I think i poked around it seems filament reflects it on the policy too
14 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
All we needed is
protected $keyType = 'string';
protected $keyType = 'string';
10 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
But carplates are unique and only have 1 also right? Should i just change it to numeric then have another field and make it unique?
10 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
Isn't it logical to have a primary key when it's unique? Carplate are unique so i don't think there's a problem right?
10 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
No description
10 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
Weird thing is virtualmin generates the SSL certificate however, i'm still using the one generated by cloudflare. But i should play around with the settings it's probably my misconfiguration
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
🥹
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
Weird thing was it didn't use to work that time
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
Nvm somehow fixed with my exact actions.. I created an alias to shiftbus.com and enabled the Apache Website Enabled and it seems to work
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
I think cloudflare should be correct? Maybe i need to mess with the .htaccess? Pardon my ignorance i'm very new to this 😦
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
Nope i unfortunately are still trying to fix this. I've moved the authentication up so that dashboard.shiftbus.com is supposed to route to the login page which works fine on my localhost side. In virtualmin, i've added dashboard.shiftbus.com as an alias of shiftbus.com. I've also requested for new certificate for the following sites in virtualmin
shiftbus.com
www.shiftbus.com
dashboard.shiftbus.com
www.dashboard.shiftbus.com
shiftbus.com
www.shiftbus.com
dashboard.shiftbus.com
www.dashboard.shiftbus.com
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
I guess this is more of a virtualmin issue right. Since my IP address is the same for both domain it becomes confused on which one to use for the domain right
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
Can i ask a stupid question. In my laravel i have the following routes.
Route::domain('dashboard.' . env('APP_URL'))->middleware([
'auth:sanctum',
config('jetstream.auth_session'),
'verified'
])->group(function () {
// My routes are here.
}
Route::domain('dashboard.' . env('APP_URL'))->middleware([
'auth:sanctum',
config('jetstream.auth_session'),
'verified'
])->group(function () {
// My routes are here.
}
Virtualmin i have 2 domains. dev-example.com and example.com I've added dashboard.example.com as a alias in virtualmin. However, when i access dashboard.example.com It redirects me to the dev-example.com instead of example.com
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
Big thanks! 😄
14 replies
CDCloudflare Developers
Created by BakaPresident on 8/19/2023 in #general-help
Cloudflare DNS returning redirect
Ahh i thought flexible would work with either. Full/Full(Strict) makes sense now because i restricted the traffic to HTTPS only and now i look at the docs it says but all connections between Cloudflare and your origin are made through HTTP which probably stopped it from work.
14 replies