This commit is contained in:
Dan Harrin
2023-02-16 13:31:41 +00:00
parent ad12656dc4
commit 3f0722cc0a
5 changed files with 16 additions and 14 deletions
+2 -7
View File
@@ -2,18 +2,13 @@ APP_NAME=Laravel
APP_ENV=ci
APP_KEY=base64:/RjsPfTKUG/cV+SQjSOfCfgFPZ85Zmwywiz5yevEZ0s=
APP_DEBUG=true
APP_URL=http://localhost::8000
APP_URL=http://127.0.0.1::8000
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
DB_CONNECTION=sqlite
BROADCAST_DRIVER=log
CACHE_DRIVER=file
+8 -2
View File
@@ -2,13 +2,14 @@
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Filament\Context;
use Filament\Models\Contracts\FilamentUser;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
class User extends Authenticatable implements FilamentUser
{
use HasApiTokens;
use HasFactory;
@@ -43,4 +44,9 @@ class User extends Authenticatable
protected $casts = [
'email_verified_at' => 'datetime',
];
public function canAccessFilament(Context $context): bool
{
return true;
}
}
@@ -2,6 +2,7 @@
namespace App\Providers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@@ -19,6 +20,6 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
//
Auth::loginUsingId(1);
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
export default {
'app/auth/login': {
url: 'admin/login',
'app/dashboard': {
url: 'admin',
selector: 'body',
},
}
+2 -2
View File
@@ -11,7 +11,7 @@ for (const [file, options] of Object.entries(schema)) {
fs.mkdirSync(`images/${directory}`, { recursive: true })
}
;(async () => {
(async () => {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.setViewport(options.viewport ?? {
@@ -19,7 +19,7 @@ for (const [file, options] of Object.entries(schema)) {
height: 1080,
deviceScaleFactor: 1,
})
await page.goto(`http://localhost:8000/${options.url}`, {
await page.goto(`http://127.0.0.1:8000/${options.url}`, {
waitUntil: 'networkidle2',
})