git add .
git commit "Implement user registration"
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Auth;
|
||||
use App\Enums\UserStatus;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\RegisterRequest;
|
||||
use App\Models\Province;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -17,13 +18,13 @@ class RegisterController extends Controller
|
||||
$withoutHeader = true;
|
||||
$withoutFooter = true;
|
||||
$withoutHero = true;
|
||||
|
||||
return view('auth.register',compact('withoutHeader','withoutFooter','withoutHero'));
|
||||
$provinces=Province::orderBy('name')->get();
|
||||
return view('auth.register',compact('withoutHeader','withoutFooter','withoutHero','provinces'));
|
||||
}
|
||||
|
||||
public function post(RegisterRequest $request)
|
||||
{
|
||||
$inputs = $request->validated();
|
||||
$inputs = $request->validated();
|
||||
|
||||
if ($request->hasFile('image')) {
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
return view('layouts.app');
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class RegisterRequest extends FormRequest
|
||||
{
|
||||
@@ -39,7 +40,8 @@ class RegisterRequest extends FormRequest
|
||||
|
||||
'national_code' => [
|
||||
'required',
|
||||
'unique:users,national_code'
|
||||
'unique:users,national_code',
|
||||
'ir_national_id'
|
||||
],
|
||||
|
||||
'gender' => [
|
||||
@@ -59,14 +61,13 @@ class RegisterRequest extends FormRequest
|
||||
'mobile' => [
|
||||
'required',
|
||||
'unique:users,mobile',
|
||||
'ir_mobile:zero_code'
|
||||
'ir_mobile'
|
||||
],
|
||||
|
||||
'email' => [
|
||||
'required',
|
||||
'email',
|
||||
'unique:users,email',
|
||||
'ir_national_id'
|
||||
],
|
||||
|
||||
'username' => [
|
||||
@@ -81,13 +82,14 @@ class RegisterRequest extends FormRequest
|
||||
],
|
||||
|
||||
'province_id' => [
|
||||
'required',
|
||||
'nullable',
|
||||
'exists:provinces,id',
|
||||
],
|
||||
|
||||
'city_id' => [
|
||||
'required',
|
||||
'exists:cities,id',
|
||||
'nullable',
|
||||
Rule::exists('cities', 'id')
|
||||
->where(fn ($query) => $query->where('province_id', $this->province_id)),
|
||||
],
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -24,11 +25,14 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @property Collection|Role[] $roles
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Admin extends Model
|
||||
{
|
||||
protected $table = 'admins';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'status' => 'int'
|
||||
@@ -48,4 +52,9 @@ class Admin extends Model
|
||||
'image',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function roles()
|
||||
{
|
||||
return $this->belongsToMany(Role::class, 'admin_roles');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class AdminRole
|
||||
*
|
||||
* @property int $admin_id
|
||||
* @property int $role_id
|
||||
*
|
||||
* @property Admin $admin
|
||||
* @property Role $role
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class AdminRole extends Model
|
||||
{
|
||||
protected $table = 'admin_roles';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'admin_id' => 'int',
|
||||
'role_id' => 'int'
|
||||
];
|
||||
|
||||
public function admin()
|
||||
{
|
||||
return $this->belongsTo(Admin::class);
|
||||
}
|
||||
|
||||
public function role()
|
||||
{
|
||||
return $this->belongsTo(Role::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class City
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $provinces
|
||||
* @property string $name
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property Collection|User[] $users
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class City extends Model
|
||||
{
|
||||
protected $table = 'cities';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'provinces' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'provinces',
|
||||
'name'
|
||||
];
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Comment extends Model
|
||||
{
|
||||
protected $table = 'comments';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
|
||||
@@ -26,6 +26,7 @@ class Favorite extends Model
|
||||
{
|
||||
protected $table = 'favorites';
|
||||
public $timestamps = false;
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
|
||||
@@ -26,6 +26,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class File extends Model
|
||||
{
|
||||
protected $table = 'files';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'size' => 'int'
|
||||
|
||||
@@ -32,6 +32,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Flight extends Model
|
||||
{
|
||||
protected $table = 'flights';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'departure_date' => 'datetime',
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Permission
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $slug
|
||||
* @property string|null $description
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @property Collection|Role[] $roles
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Permission extends Model
|
||||
{
|
||||
protected $table = 'permissions';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function roles()
|
||||
{
|
||||
return $this->belongsToMany(Role::class, 'role_permissions');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Province
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Province extends Model
|
||||
{
|
||||
protected $table = 'provinces';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function users()
|
||||
{
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Role
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $slug
|
||||
* @property string $description
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property Collection|Admin[] $admins
|
||||
* @property Collection|Permission[] $permissions
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Role extends Model
|
||||
{
|
||||
protected $table = 'roles';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function admins()
|
||||
{
|
||||
return $this->belongsToMany(Admin::class, 'admin_roles');
|
||||
}
|
||||
|
||||
public function permissions()
|
||||
{
|
||||
return $this->belongsToMany(Permission::class, 'role_permissions');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class RolePermission
|
||||
*
|
||||
* @property int $role_id
|
||||
* @property int $permission_id
|
||||
*
|
||||
* @property Permission $permission
|
||||
* @property Role $role
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class RolePermission extends Model
|
||||
{
|
||||
protected $table = 'role_permissions';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'role_id' => 'int',
|
||||
'permission_id' => 'int'
|
||||
];
|
||||
|
||||
public function permission()
|
||||
{
|
||||
return $this->belongsTo(Permission::class);
|
||||
}
|
||||
|
||||
public function role()
|
||||
{
|
||||
return $this->belongsTo(Role::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Setting
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $code
|
||||
* @property string $value
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Setting extends Model
|
||||
{
|
||||
protected $table = 'settings';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'value'
|
||||
];
|
||||
}
|
||||
@@ -32,6 +32,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Tour extends Model
|
||||
{
|
||||
protected $table = 'tours';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'travel_type_id' => 'int',
|
||||
|
||||
@@ -23,6 +23,7 @@ class TourFlight extends Model
|
||||
{
|
||||
protected $table = 'tour_flights';
|
||||
public $timestamps = false;
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'tour_id' => 'int',
|
||||
|
||||
@@ -23,6 +23,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class TravelType extends Model
|
||||
{
|
||||
protected $table = 'travel_types';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'status' => 'int'
|
||||
|
||||
+21
-7
@@ -8,14 +8,15 @@ namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class User
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $Firstname
|
||||
* @property string $Lastname
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $national_code
|
||||
* @property int $gender
|
||||
* @property int $marital_status
|
||||
@@ -25,24 +26,28 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property string|null $profile_image
|
||||
* @property string $username
|
||||
* @property string $password
|
||||
* @property string|null $province
|
||||
* @property string|null $city
|
||||
* @property int $province_id
|
||||
* @property int $city_id
|
||||
* @property int $status
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property City $city
|
||||
* @property Collection|Comment[] $comments
|
||||
* @property Collection|Favorite[] $favorites
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class User extends Model
|
||||
class User extends Authenticatable
|
||||
{
|
||||
protected $table = 'users';
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'gender' => 'int',
|
||||
'marital_status' => 'int',
|
||||
'province_id' => 'int',
|
||||
'city_id' => 'int',
|
||||
'status' => 'int'
|
||||
];
|
||||
|
||||
@@ -62,11 +67,20 @@ class User extends Model
|
||||
'profile_image',
|
||||
'username',
|
||||
'password',
|
||||
'province',
|
||||
'city',
|
||||
'province_id',
|
||||
'city_id',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function city()
|
||||
{
|
||||
return $this->belongsTo(City::class);
|
||||
}
|
||||
public function province()
|
||||
{
|
||||
return $this->belongsTo(Province::class);
|
||||
}
|
||||
|
||||
public function comments()
|
||||
{
|
||||
return $this->hasMany(Comment::class);
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.2.3
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1:3306
|
||||
-- Generation Time: Aug 15, 2026 at 12:26 PM
|
||||
-- Server version: 8.4.7
|
||||
-- PHP Version: 8.3.28
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `airline_agency`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `admins`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `admins`;
|
||||
CREATE TABLE IF NOT EXISTS `admins` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`first_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`last_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`mobile` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`status` tinyint NOT NULL DEFAULT '1' COMMENT 'Status: Inactive=0, Active=1, Blocked=2',
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `username` (`username`),
|
||||
UNIQUE KEY `email` (`email`),
|
||||
UNIQUE KEY `mobile` (`mobile`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `comments`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `comments`;
|
||||
CREATE TABLE IF NOT EXISTS `comments` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint UNSIGNED NOT NULL,
|
||||
`tour_id` bigint UNSIGNED NOT NULL,
|
||||
`rating` tinyint NOT NULL,
|
||||
`comment` text COLLATE utf8mb4_unicode_ci,
|
||||
`status` tinyint NOT NULL DEFAULT '0' COMMENT 'Status: 0=Pending, 1=Approved, 2=Rejected',
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `tour_id` (`tour_id`),
|
||||
KEY `user_id` (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `favorites`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `favorites`;
|
||||
CREATE TABLE IF NOT EXISTS `favorites` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`user_id` bigint UNSIGNED NOT NULL,
|
||||
`favoritable_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`favoritable_id` bigint UNSIGNED NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `unique_favorite` (`user_id`,`favoritable_type`,`favoritable_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `files`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `files`;
|
||||
CREATE TABLE IF NOT EXISTS `files` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`extension` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`size` bigint UNSIGNED NOT NULL,
|
||||
`original_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`created_at` timestamp NOT NULL,
|
||||
`updated_at` timestamp NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `flights`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `flights`;
|
||||
CREATE TABLE IF NOT EXISTS `flights` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`airline` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`flight_number` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`origin` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`destination` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`departure_date` date DEFAULT NULL,
|
||||
`departure_time` time DEFAULT NULL,
|
||||
`arrival_time` time DEFAULT NULL,
|
||||
`flight_class` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`capacity` int DEFAULT NULL,
|
||||
`price` decimal(10,2) DEFAULT NULL,
|
||||
`status` tinyint DEFAULT NULL COMMENT 'Status: 0=Draft, 1=Active, 2=Inactive, 3=Finished, 4=Cancelled',
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tours`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `tours`;
|
||||
CREATE TABLE IF NOT EXISTS `tours` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`summary` text COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`description` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`travel_type_id` tinyint UNSIGNED NOT NULL,
|
||||
`price` decimal(12,2) NOT NULL,
|
||||
`departure_date` date NOT NULL,
|
||||
`status` tinyint NOT NULL COMMENT 'Draft=0|Active=1|Inactive=2|Finished=3||Cancelled=4',
|
||||
`created_at` timestamp NOT NULL,
|
||||
`updated_at` timestamp NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `tour_flights`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `tour_flights`;
|
||||
CREATE TABLE IF NOT EXISTS `tour_flights` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`tour_id` bigint NOT NULL,
|
||||
`flight_id` bigint NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `tour_id` (`tour_id`),
|
||||
KEY `flight_id` (`flight_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `travel_types`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `travel_types`;
|
||||
CREATE TABLE IF NOT EXISTS `travel_types` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`status` tinyint NOT NULL DEFAULT '1' COMMENT 'Status: 0=Inactive, 1=Active',
|
||||
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name` (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `users`;
|
||||
CREATE TABLE IF NOT EXISTS `users` (
|
||||
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`first_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`last_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`national_code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`gender` tinyint NOT NULL COMMENT 'male:0 | famale:1',
|
||||
`marital_status` tinyint NOT NULL COMMENT 'single:0|Married:1|Separated:2',
|
||||
`spouse_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`mobile` varchar(11) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`profile_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`password` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`province` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`city` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`status` tinyint NOT NULL COMMENT 'Draft=0|Active=1|Inactive=2|Expired=3|Cancelled=4',
|
||||
`created_at` timestamp NOT NULL,
|
||||
`updated_at` timestamp NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--
|
||||
-- Constraints for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints for table `comments`
|
||||
--
|
||||
ALTER TABLE `comments`
|
||||
ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
||||
ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
|
||||
|
||||
--
|
||||
-- Constraints for table `favorites`
|
||||
--
|
||||
ALTER TABLE `favorites`
|
||||
ADD CONSTRAINT `favorites_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
@@ -1,336 +1,591 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="theme-hero-area-bg-wrap">
|
||||
<div class="theme-hero-area-bg"
|
||||
style="background-image:url(img/adult-book-business-cactus-297755_1500x800.jpg);"></div>
|
||||
style="background-image:url({{ asset('img/adult-book-business-cactus-297755_1500x800.jpg') }});">
|
||||
</div>
|
||||
|
||||
<div class="theme-hero-area-mask theme-hero-area-mask-strong"></div>
|
||||
</div>
|
||||
|
||||
<div class="theme-hero-area-body">
|
||||
|
||||
<div class="theme-page-section _pt-100 theme-page-section-xl">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
|
||||
<div class="theme-login theme-login-white">
|
||||
|
||||
{{-- Header --}}
|
||||
<div class="theme-login-header">
|
||||
<h1 class="theme-login-title">ثبت نام</h1>
|
||||
<p class="theme-login-subtitle">حساب Bookify جدید ایجاد کنید</p>
|
||||
|
||||
<h1 class="theme-login-title">
|
||||
ثبت نام
|
||||
</h1>
|
||||
|
||||
<p class="theme-login-subtitle">
|
||||
حساب کاربری جدید ایجاد کنید
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Form --}}
|
||||
<div class="theme-login-box">
|
||||
|
||||
<div class="theme-login-box-inner">
|
||||
<form class="theme-login-form" action="{{ route('auth.register.post') }}"
|
||||
method="POST"
|
||||
enctype="multipart/form-data">>
|
||||
|
||||
<form
|
||||
class="theme-login-form"
|
||||
action="{{ route('auth.register.post') }}"
|
||||
method="POST"
|
||||
enctype="multipart/form-data"
|
||||
>
|
||||
|
||||
@csrf
|
||||
<div>
|
||||
<label for="first_name"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
|
||||
|
||||
{{-- First Name --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="first_name"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
نام
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="first_name"
|
||||
name="first_name"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('first_name')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
value="{{ old('first_name') }}"
|
||||
autocomplete="given-name"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('first_name')
|
||||
<span>{{$message}}</span>
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<label for="last_name"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
|
||||
|
||||
{{-- Last Name --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="last_name"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
نام خانوادگی
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="last_name"
|
||||
name="last_name"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('last_name')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
value="{{ old('last_name') }}"
|
||||
autocomplete="family-name"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('last_name')
|
||||
<span>{{$message}}</span>
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<label for="national_code"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
کدملی
|
||||
|
||||
|
||||
{{-- National Code --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="national_code"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
کد ملی
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="national_code"
|
||||
name="national_code"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('national_code')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
</div>
|
||||
@error('national_code')
|
||||
<span>{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="row" data-gutter="10">
|
||||
value="{{ old('national_code') }}"
|
||||
inputmode="numeric"
|
||||
maxlength="10"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('national_code')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Gender --}}
|
||||
<div class="row mb-4" data-gutter="10">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<select class="form-control"
|
||||
name="gender">
|
||||
<label
|
||||
class="block text-sm font-medium text-gray-500 dark:text-gray-300 mb-2"
|
||||
>
|
||||
جنسیت
|
||||
</label>
|
||||
|
||||
<select
|
||||
name="gender"
|
||||
class="form-control"
|
||||
>
|
||||
|
||||
<option value="">
|
||||
جنسیت
|
||||
انتخاب جنسیت
|
||||
</option>
|
||||
|
||||
<option value="0">
|
||||
<option
|
||||
value="0"
|
||||
@selected(old('gender') == '0')
|
||||
>
|
||||
مرد
|
||||
</option>
|
||||
|
||||
<option value="1">
|
||||
<option
|
||||
value="1"
|
||||
@selected(old('gender') == '1')
|
||||
>
|
||||
زن
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
@error('gender')
|
||||
<span>{{$message}}</span>
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Marital Status --}}
|
||||
<div class="col-md-6">
|
||||
|
||||
<select class="form-control"
|
||||
name="marital_status">
|
||||
<label
|
||||
class="block text-sm font-medium text-gray-500 dark:text-gray-300 mb-2"
|
||||
>
|
||||
وضعیت تأهل
|
||||
</label>
|
||||
|
||||
<select
|
||||
name="marital_status"
|
||||
class="form-control"
|
||||
>
|
||||
|
||||
<option value="">
|
||||
وضعیت تاهل
|
||||
انتخاب وضعیت
|
||||
</option>
|
||||
|
||||
<option value="0">
|
||||
<option
|
||||
value="0"
|
||||
@selected(old('marital_status') == '0')
|
||||
>
|
||||
مجرد
|
||||
</option>
|
||||
|
||||
<option value="1">
|
||||
متاهل
|
||||
<option
|
||||
value="1"
|
||||
@selected(old('marital_status') == '1')
|
||||
>
|
||||
متأهل
|
||||
</option>
|
||||
|
||||
<option value="2">
|
||||
<option
|
||||
value="2"
|
||||
@selected(old('marital_status') == '2')
|
||||
>
|
||||
متارکه
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
@error('marital_status')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@error('marital_status')
|
||||
<span>{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div>
|
||||
<label for="spouse_name"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
نام نام خانوادگی همسر
|
||||
|
||||
|
||||
{{-- Spouse Name --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="spouse_name"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
نام و نام خانوادگی همسر
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="spouse_name"
|
||||
name="spouse_name"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('spouse_name')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
</div>
|
||||
@error('spouse_name')
|
||||
<span>{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div>
|
||||
<label for="mobile"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
موبایل
|
||||
value="{{ old('spouse_name') }}"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('spouse_name')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Mobile --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="mobile"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
شماره موبایل
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="mobile"
|
||||
name="mobile"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('mobile')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
value="{{ old('mobile') }}"
|
||||
inputmode="tel"
|
||||
autocomplete="tel"
|
||||
placeholder="09123456789"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('mobile')
|
||||
<span>{{$message}}</span>
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<label for="email"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
|
||||
|
||||
{{-- Email --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="email"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
ایمیل
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('email')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
</div>
|
||||
@error('email')
|
||||
<span>{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div>
|
||||
<label for="profile_image"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
عکس
|
||||
value="{{ old('email') }}"
|
||||
autocomplete="email"
|
||||
placeholder="example@email.com"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</label>
|
||||
<div class="mt-3">
|
||||
<input
|
||||
type="text"
|
||||
id="profile_image"
|
||||
name="profile_image"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('profile_image')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
</div>
|
||||
@error('profile_image')
|
||||
<span>{{$message}}</span>
|
||||
|
||||
@error('email')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<label for="username"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
|
||||
|
||||
{{-- Profile Image --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="image"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
تصویر پروفایل
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="file"
|
||||
id="image"
|
||||
name="image"
|
||||
accept=".jpg,.jpeg,.png,.webp"
|
||||
class="block w-full p-3 text-base outline-none text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent rounded-md"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('image')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Username --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="username"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
نام کاربری
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="text"
|
||||
id="username"
|
||||
name="username"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('username')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
value="{{ old('username') }}"
|
||||
autocomplete="username"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('username')
|
||||
<span>{{$message}}</span>
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div>
|
||||
<label for="password"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
|
||||
رمز عبور
|
||||
</label>
|
||||
<div class="mt-3">
|
||||
<input
|
||||
type="text"
|
||||
id="password"
|
||||
name="password"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
</div>
|
||||
@error('password')
|
||||
<span>{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div>
|
||||
<label for="password"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
تکرار رمز عبور
|
||||
</label>
|
||||
<div class="mt-3">
|
||||
<input
|
||||
type="password"
|
||||
tabindex="6"
|
||||
id="password"
|
||||
name="password_confirmation"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="province"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
|
||||
{{-- Province --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="province_id"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
استان
|
||||
</label>
|
||||
<div class="mt-3">
|
||||
<input
|
||||
type="text"
|
||||
id="province"
|
||||
name="province"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('province')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
</div>
|
||||
@error('province')
|
||||
<span>{{$message}}</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div>
|
||||
<label for="city"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300">
|
||||
|
||||
شهرستان </label>
|
||||
<div class="mt-3">
|
||||
<input
|
||||
type="text"
|
||||
id="city"
|
||||
name="city"
|
||||
autofocus
|
||||
tabindex="1"
|
||||
value="{{old('city')}}"
|
||||
class="block w-full p-3 text-base outline dark:outline-none outline-1 -outline-offset-1 placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md outline-none focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100 dark:focus:ring-blue-400"
|
||||
/>
|
||||
|
||||
<select
|
||||
id="province_id"
|
||||
name="province_id"
|
||||
class="form-control"
|
||||
>
|
||||
|
||||
<option value="">
|
||||
انتخاب استان
|
||||
</option>
|
||||
|
||||
@foreach($provinces as $province)
|
||||
|
||||
<option
|
||||
value="{{ $province->id }}"
|
||||
@selected(old('province_id') == $province->id)
|
||||
>
|
||||
{{ $province->name }}
|
||||
</option>
|
||||
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@error('city')
|
||||
<span>{{$message}}</span>
|
||||
|
||||
@error('province_id')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="submit-btn" tabindex="7" >ساخت حساب کاربری</button>
|
||||
|
||||
|
||||
{{-- City --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="city_id"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
شهرستان
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<select
|
||||
id="city_id"
|
||||
name="city_id"
|
||||
class="form-control"
|
||||
disabled
|
||||
>
|
||||
|
||||
<option value="">
|
||||
ابتدا استان را انتخاب کنید
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
@error('city_id')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Password --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="password"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
رمز عبور
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
name="password"
|
||||
autocomplete="new-password"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@error('password')
|
||||
<span class="text-red-500 text-sm">
|
||||
{{ $message }}
|
||||
</span>
|
||||
@enderror
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Password Confirmation --}}
|
||||
<div class="mb-4">
|
||||
|
||||
<label
|
||||
for="password_confirmation"
|
||||
class="block text-sm/6 font-medium text-gray-500 dark:text-gray-300"
|
||||
>
|
||||
تکرار رمز عبور
|
||||
</label>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<input
|
||||
type="password"
|
||||
id="password_confirmation"
|
||||
name="password_confirmation"
|
||||
autocomplete="new-password"
|
||||
class="block w-full p-3 text-base outline-none placeholder:text-gray-400 sm:text-sm/6 transition-all text-gray-800 dark:text-gray-100 dark:bg-gray-900 bg-slate-100 border border-transparent hover:border-slate-200 appearance-none rounded-md focus:bg-white focus:border-indigo-400 focus:ring-2 focus:ring-indigo-100"
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{{-- Submit --}}
|
||||
<div class="mt-6">
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="submit-btn"
|
||||
>
|
||||
ساخت حساب کاربری
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
{{-- Login --}}
|
||||
<p class="mt-8 text-center text-sm/6 text-gray-500 dark:text-gray-300">
|
||||
حساب کاربری دارید ؟
|
||||
<a class="text-blue-400" href="{{route('auth.login.index')}}">ورود</a>
|
||||
|
||||
حساب کاربری دارید؟
|
||||
|
||||
<a
|
||||
class="text-blue-400"
|
||||
href="{{ route('auth.login.index') }}"
|
||||
>
|
||||
ورود
|
||||
</a>
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\IndexController;
|
||||
use App\Http\Controllers\HomeController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
|
||||
Route::get('/', [IndexController::class, 'index'])->name('index');
|
||||
Route::get('/', [HomeController::class,'index'])
|
||||
->name('index');
|
||||
|
||||
Reference in New Issue
Block a user