Getting a 403 when deployed on hosted server on hostinger
I have seen multiple folks getting this issue, but have not find a complete solution.
env is set to local
no logs in storage/logs/laravel.logs
Here is my user model file
Kindly HELP!!!
<?php
namespace App\Models;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable implements FilamentUser
{
use HasApiTokens, HasFactory, Notifiable;
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@d2rtech.com'); }
protected $fillable = [ 'name', 'email', 'password', 'isactive', 'isadmin', ];
protected $hidden = [ 'password', 'remember_token', ]; protected $casts = [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; public function userskills(): BelongsTo { return $this->belongsTo(Userskill::class); } }
return str_ends_with($this->email, '@d2rtech.com'); }
protected $fillable = [ 'name', 'email', 'password', 'isactive', 'isadmin', ];
protected $hidden = [ 'password', 'remember_token', ]; protected $casts = [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; public function userskills(): BelongsTo { return $this->belongsTo(Userskill::class); } }
Solution:Jump to solution
Problem is resolved, the issue was that the server.php was missing. Somehow by default when we create a Project server.php is not created, hence application could not be started
6 Replies
any help?
Does the rest of the app work? Are you on a VPN? Hostinger (depending on hosting level) DOES block some IPs.
nope... i am not able to open anything
i am not on VPN
My complete app is basically panel only
I am getting this when i open the link
and i get this when i go to the path specified in the Filament AdminPanelProvider
Solution
Problem is resolved, the issue was that the server.php was missing. Somehow by default when we create a Project server.php is not created, hence application could not be started