From e79fd2080132345bcc9f86076be9f5fa7b7436a1 Mon Sep 17 00:00:00 2001 From: fatihalp Date: Sun, 8 Mar 2026 00:30:51 +0300 Subject: [PATCH] Fix login text and README --- .../database/Seeders/DemoContentSeeder.php | 30 +------------ .../User/database/seeders/AuthUserSeeder.php | 43 +++++++++++++++++++ .../User/resources/views/auth/login.blade.php | 7 +-- .../resources/views/auth/register.blade.php | 1 - README.md | 39 +++++++++++++---- database/seeders/DatabaseSeeder.php | 1 + 6 files changed, 76 insertions(+), 45 deletions(-) create mode 100644 Modules/User/database/seeders/AuthUserSeeder.php diff --git a/Modules/Demo/database/Seeders/DemoContentSeeder.php b/Modules/Demo/database/Seeders/DemoContentSeeder.php index c59543cbe..ebabeeeac 100644 --- a/Modules/Demo/database/Seeders/DemoContentSeeder.php +++ b/Modules/Demo/database/Seeders/DemoContentSeeder.php @@ -3,41 +3,13 @@ namespace Modules\Demo\Database\Seeders; use Illuminate\Database\Seeder; -use Illuminate\Support\Facades\Hash; -use Modules\User\App\Models\User; -use Spatie\Permission\Models\Role; class DemoContentSeeder extends Seeder { public function run(): void { - $admin = User::query()->updateOrCreate( - ['email' => 'a@a.com'], - [ - 'name' => 'Admin', - 'password' => Hash::make('236330'), - 'status' => 'active', - ], - ); - - $partner = User::query()->updateOrCreate( - ['email' => 'b@b.com'], - [ - 'name' => 'Partner', - 'password' => Hash::make('36330'), - 'status' => 'active', - ], - ); - - if (class_exists(Role::class)) { - $adminRole = Role::firstOrCreate(['name' => 'admin', 'guard_name' => 'web']); - $partnerRole = Role::firstOrCreate(['name' => 'partner', 'guard_name' => 'web']); - - $admin->syncRoles([$adminRole->name]); - $partner->syncRoles([$partnerRole->name]); - } - $this->call([ + \Modules\User\Database\Seeders\AuthUserSeeder::class, \Modules\Listing\Database\Seeders\ListingSeeder::class, \Modules\Listing\Database\Seeders\ListingPanelDemoSeeder::class, \Modules\Favorite\Database\Seeders\FavoriteDemoSeeder::class, diff --git a/Modules/User/database/seeders/AuthUserSeeder.php b/Modules/User/database/seeders/AuthUserSeeder.php new file mode 100644 index 000000000..7d64fe41f --- /dev/null +++ b/Modules/User/database/seeders/AuthUserSeeder.php @@ -0,0 +1,43 @@ +updateOrCreate( + ['email' => 'a@a.com'], + [ + 'name' => 'Admin', + 'password' => '236330', + 'status' => 'active', + ], + ); + + User::query()->updateOrCreate( + ['email' => 'b@b.com'], + [ + 'name' => 'Member', + 'password' => '36330', + 'status' => 'active', + ], + ); + + if (! class_exists(Role::class) || ! Schema::hasTable((new Role())->getTable())) { + return; + } + + $adminRole = Role::query()->firstOrCreate([ + 'name' => 'admin', + 'guard_name' => 'web', + ]); + + $admin->syncRoles([$adminRole->name]); + } +} diff --git a/Modules/User/resources/views/auth/login.blade.php b/Modules/User/resources/views/auth/login.blade.php index c8e60e157..6bd3e8256 100644 --- a/Modules/User/resources/views/auth/login.blade.php +++ b/Modules/User/resources/views/auth/login.blade.php @@ -3,11 +3,6 @@ @section('title', 'Sign in') @section('content') -
-

Account

-

Sign in

-
- @if (session('status'))
{{ session('status') }}
@endif @@ -74,7 +69,7 @@ diff --git a/Modules/User/resources/views/auth/register.blade.php b/Modules/User/resources/views/auth/register.blade.php index 0850a88ce..7f406ca6d 100644 --- a/Modules/User/resources/views/auth/register.blade.php +++ b/Modules/User/resources/views/auth/register.blade.php @@ -6,7 +6,6 @@

Account

Create account

-

Open your account once and manage listings, messages, and saved items from one place.

diff --git a/README.md b/README.md index 7d8993f01..789cadaca 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A modern classified ads platform built with Laravel 12, FilamentPHP v5, and Lara - ๐Ÿ“ **Locations** โ€” Country and city management - ๐Ÿ‘ค **User Profiles** โ€” Manage your listings and account - ๐Ÿ” **Admin Panel** โ€” Full control via FilamentPHP v5 at `/admin` -- ๐Ÿค **Partner Panel** โ€” Users manage their own listings at `/partner/{id}` (tenant isolation) +- ๐Ÿงญ **Frontend Panel** โ€” Authenticated users manage listings, profile, videos, favorites, and inbox at `/panel` - ๐Ÿงช **Demo Mode** โ€” Per-visitor PostgreSQL schema provisioning with seeded data and automatic cleanup - ๐ŸŒ **10 Languages** โ€” English, Turkish, Arabic, German, French, Spanish, Portuguese, Russian, Chinese, Japanese - ๐Ÿณ **Docker Ready** โ€” One-command production and development setup @@ -51,17 +51,17 @@ docker compose up -d # The application will be available at http://localhost:8000 ``` -### Demo Credentials (`DEMO=1` only) +### Default Accounts | Role | Email | Password | |------|-------|----------| | Admin | a@a.com | 236330 | -| Partner | b@b.com | 36330 | +| Member | b@b.com | 36330 | -Demo preparation auto-logs the visitor into the schema-local admin account, so manual login is usually not required. +These accounts are seeded by `Modules\User\Database\Seeders\AuthUserSeeder`. In demo mode, demo preparation still auto-logs the visitor into the schema-local admin account. **Admin Panel:** http://localhost:8000/admin -**Partner Panel:** http://localhost:8000/partner +**Frontend Panel:** http://localhost:8000/panel --- @@ -184,9 +184,10 @@ Modules/ โ”‚ โ”œโ”€โ”€ database/migrations/ โ”‚ โ””โ”€โ”€ database/seeders/ โ”‚ -โ””โ”€โ”€ Profile/ # User profile pages - โ”œโ”€โ”€ Models/Profile.php - โ”œโ”€โ”€ Http/Controllers/ +โ””โ”€โ”€ User/ # Users, auth, profile, and account flows + โ”œโ”€โ”€ App/Http/Controllers/ + โ”œโ”€โ”€ App/Models/ + โ”œโ”€โ”€ Database/Seeders/ โ””โ”€โ”€ database/migrations/ ``` @@ -202,10 +203,30 @@ Modules/ | Role | Access | |------|--------| | `admin` | Full admin panel access | -| `partner` | Partner panel only (manages own listings) | --- +## Code Contributors + +

+ + OpenClassify Logo + +

+ +OpenClassify is a modular open source classified platform built with Laravel. + +- Website: [openclassify.com](https://openclassify.com) +- Package: [openclassify/openclassify](https://packagist.org/packages/openclassify/openclassify) + +This project is maintained and improved by its contributors. + +

+ + OpenClassify Contributors + +

+ ## Creating a New Module ```bash diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 0710ec4d1..2ee822070 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -9,6 +9,7 @@ class DatabaseSeeder extends Seeder public function run(): void { $this->call([ + \Modules\User\Database\Seeders\AuthUserSeeder::class, HomeSliderSettingsSeeder::class, \Modules\Location\Database\Seeders\LocationSeeder::class, \Modules\Category\Database\Seeders\CategorySeeder::class,