How to login from smartphone?

Hi, how to login from smartphone in same network? Tried to access 192.168.1.4/project-filament/public/admin the login form was shown. But when I try to login, nothing happens. Just blink, email and password blank again. Have tried to add canAccessPanel returning true; Any ideas?
2 Replies
trovster
trovster15mo ago
Have you set the APP_URL to be 192.168.1.4 ?
alfaruqrizqi18
alfaruqrizqi18OP15mo ago
oh ok, will try it still same
<?php

namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;

class User extends Authenticatable implements FilamentUser {
use HasApiTokens, HasFactory, Notifiable;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];

/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];

/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];

public function canAccessPanel(Panel $panel): bool {
return true;
}

public function contents(): HasMany {
return $this->hasMany(Content::class);
}
}
<?php

namespace App\Models;

// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;

class User extends Authenticatable implements FilamentUser {
use HasApiTokens, HasFactory, Notifiable;

/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
];

/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];

/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];

public function canAccessPanel(Panel $panel): bool {
return true;
}

public function contents(): HasMany {
return $this->hasMany(Content::class);
}
}
this is my user model This is my env
APP_NAME=Laravel
APP_ENV=local
APP_KEY=***************
APP_DEBUG=true
APP_URL=http://192.168.1.4
APP_NAME=Laravel
APP_ENV=local
APP_KEY=***************
APP_DEBUG=true
APP_URL=http://192.168.1.4
Want results from more Discord servers?
Add your server