feat: add authentication routes and controllers
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class LoginController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$withoutHeader = true;
|
||||||
|
$withoutFooter = true;
|
||||||
|
return view('auth.login' , compact('withoutFooter' , 'withoutHeader'));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class LogoutController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class RegisterController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$withoutHeader = true;
|
||||||
|
$withoutFooter = true;
|
||||||
|
return view('auth.register' , compact('withoutFooter' , 'withoutHeader'));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+4
-1
@@ -6,7 +6,10 @@ use Illuminate\Foundation\Configuration\Middleware;
|
|||||||
|
|
||||||
return Application::configure(basePath: dirname(__DIR__))
|
return Application::configure(basePath: dirname(__DIR__))
|
||||||
->withRouting(
|
->withRouting(
|
||||||
web: __DIR__.'/../routes/web.php',
|
web: [
|
||||||
|
__DIR__.'/../routes/web.php',
|
||||||
|
__DIR__.'/../routes/auth.php',
|
||||||
|
],
|
||||||
commands: __DIR__.'/../routes/console.php',
|
commands: __DIR__.'/../routes/console.php',
|
||||||
health: '/up',
|
health: '/up',
|
||||||
)
|
)
|
||||||
|
|||||||
+3
-1
@@ -7,8 +7,10 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
|
"hekmatinasser/verta": "^9.0",
|
||||||
"laravel/framework": "^12.0",
|
"laravel/framework": "^12.0",
|
||||||
"laravel/tinker": "^2.10.1"
|
"laravel/tinker": "^2.10.1",
|
||||||
|
"sadegh19b/laravel-persian-validation": "^2.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.23",
|
"fakerphp/faker": "^1.23",
|
||||||
|
|||||||
Generated
+247
-1
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "08c06dd385602178e63890a24d349efc",
|
"content-hash": "d2f9c73ad216c4d120251d41cec0c1ee",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
@@ -1058,6 +1058,189 @@
|
|||||||
],
|
],
|
||||||
"time": "2026-07-17T13:53:03+00:00"
|
"time": "2026-07-17T13:53:03+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "hekmatinasser/jalali",
|
||||||
|
"version": "v8.2.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/hekmatinasser/jalali.git",
|
||||||
|
"reference": "423c848ec32fb36e9ab9610d82f98efa2de0f79d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/hekmatinasser/jalali/zipball/423c848ec32fb36e9ab9610d82f98efa2de0f79d",
|
||||||
|
"reference": "423c848ec32fb36e9ab9610d82f98efa2de0f79d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"hekmatinasser/notowo": "^1.0",
|
||||||
|
"php": "^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "^4.18|^5.20|^6.24|^7.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helpers.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Hekmatinasser\\Jalali\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nasser Hekmati",
|
||||||
|
"email": "hekmati.nasser@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "This Package helps developers to work with Jalali Datetime class for PHP",
|
||||||
|
"keywords": [
|
||||||
|
"Jalali",
|
||||||
|
"date",
|
||||||
|
"datetime",
|
||||||
|
"php",
|
||||||
|
"shamsi"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/hekmatinasser/jalali/issues",
|
||||||
|
"source": "https://github.com/hekmatinasser/jalali/tree/x8.2.3"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/hekmatinasser",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-04-09T12:43:59+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hekmatinasser/notowo",
|
||||||
|
"version": "v1.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/hekmatinasser/notowo.git",
|
||||||
|
"reference": "c51ad5dcedac966dd93ce558ac7e6a84e0020d6d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/hekmatinasser/notowo/zipball/c51ad5dcedac966dd93ce558ac7e6a84e0020d6d",
|
||||||
|
"reference": "c51ad5dcedac966dd93ce558ac7e6a84e0020d6d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helpers.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Hekmatinasser\\Notowo\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nasser Hekmati",
|
||||||
|
"email": "hekmati.nasser@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "This Package helps developers change number to word for all language on Laravel freamwork PHP",
|
||||||
|
"keywords": [
|
||||||
|
"Notowo",
|
||||||
|
"laravel",
|
||||||
|
"n2w",
|
||||||
|
"number",
|
||||||
|
"word"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/hekmatinasser/notowo/issues",
|
||||||
|
"source": "https://github.com/hekmatinasser/notowo/tree/v1.0.1"
|
||||||
|
},
|
||||||
|
"time": "2017-09-22T13:41:16+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "hekmatinasser/verta",
|
||||||
|
"version": "v9.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/hekmatinasser/verta.git",
|
||||||
|
"reference": "f3cff537f07ef302b1ea24f59e9c1d5e3a1c36cb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/hekmatinasser/verta/zipball/f3cff537f07ef302b1ea24f59e9c1d5e3a1c36cb",
|
||||||
|
"reference": "f3cff537f07ef302b1ea24f59e9c1d5e3a1c36cb",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"hekmatinasser/jalali": "^8.2.3",
|
||||||
|
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0|^13.0",
|
||||||
|
"illuminate/validation": "^8.0|^9.0|^10.0|^11.0|^12.0|^13.0",
|
||||||
|
"php": "^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "^6.23|^7.0|^8.0|^11.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"aliases": {
|
||||||
|
"Verta": "Hekmatinasser\\Verta\\Verta"
|
||||||
|
},
|
||||||
|
"providers": [
|
||||||
|
"Hekmatinasser\\Verta\\Laravel\\VertaServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helpers.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Hekmatinasser\\Verta\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nasser Hekmati",
|
||||||
|
"email": "hekmati.nasser@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "This Package helps developers to work with Jalali Datetime class for Laravel Framework PHP",
|
||||||
|
"keywords": [
|
||||||
|
"Jalali",
|
||||||
|
"Verta",
|
||||||
|
"date",
|
||||||
|
"datetime",
|
||||||
|
"laravel",
|
||||||
|
"shamsi"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/hekmatinasser/verta/issues",
|
||||||
|
"source": "https://github.com/hekmatinasser/verta/tree/v9.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/hekmatinasser",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-05-08T06:26:09+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v12.66.0",
|
"version": "v12.66.0",
|
||||||
@@ -3299,6 +3482,69 @@
|
|||||||
},
|
},
|
||||||
"time": "2026-06-18T03:57:49+00:00"
|
"time": "2026-06-18T03:57:49+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sadegh19b/laravel-persian-validation",
|
||||||
|
"version": "v2.1.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/sadegh19b/laravel-persian-validation.git",
|
||||||
|
"reference": "827b446c54121d9fcb0e06415788645c62f7dcd0"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/sadegh19b/laravel-persian-validation/zipball/827b446c54121d9fcb0e06415788645c62f7dcd0",
|
||||||
|
"reference": "827b446c54121d9fcb0e06415788645c62f7dcd0",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"illuminate/support": "^11.0|^12.0|^13.0",
|
||||||
|
"php": ">=8.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "^9.0",
|
||||||
|
"phpunit/phpunit": "^11.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Sadegh19b\\LaravelPersianValidation\\PersianValidationServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Sadegh19b\\LaravelPersianValidation\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Sadegh Barzegar",
|
||||||
|
"email": "sadegh19b@gmail.com",
|
||||||
|
"homepage": "https://github.com/sadegh19b",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A comprehensive Laravel validation package for Persian text, numbers, dates, and Iranian national identifiers",
|
||||||
|
"homepage": "https://github.com/sadegh19b/laravel-persian-validation",
|
||||||
|
"keywords": [
|
||||||
|
"farsi",
|
||||||
|
"laravel",
|
||||||
|
"persian",
|
||||||
|
"validate",
|
||||||
|
"validation",
|
||||||
|
"validator"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/sadegh19b/laravel-persian-validation/issues",
|
||||||
|
"source": "https://github.com/sadegh19b/laravel-persian-validation/tree/v2.1.0"
|
||||||
|
},
|
||||||
|
"time": "2026-04-25T07:43:18+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/clock",
|
"name": "symfony/clock",
|
||||||
"version": "v8.1.0",
|
"version": "v8.1.0",
|
||||||
|
|||||||
@@ -53,14 +53,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@include('layouts.header')
|
@includeUnless(isset($withoutHeader) , 'layouts.header')
|
||||||
<main class="main">
|
<main class="main">
|
||||||
|
|
||||||
@yield('content')
|
@yield('content')
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
@include('layouts.footer')
|
@includeUnless(isset($withoutFooter) , 'layouts.footer')
|
||||||
|
|
||||||
|
|
||||||
<a href="#" id="scroll-top"><i class="far fa-angle-up"></i></a>
|
<a href="#" id="scroll-top"><i class="far fa-angle-up"></i></a>
|
||||||
|
|||||||
@@ -42,8 +42,8 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="account">
|
<div class="account">
|
||||||
<a href="#"><i class="far fa-sign-in"></i>وارد شدن</a>
|
<a href="{{route('auth.login')}}"><i class="far fa-sign-in"></i>وارد شدن</a>
|
||||||
<a href="#"><i class="far fa-user-tie"></i>ثبت نام</a>
|
<a href="{{route('auth.register')}}"><i class="far fa-user-tie"></i>ثبت نام</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Http\Controllers\Auth\LoginController;
|
||||||
|
use App\Http\Controllers\Auth\RegisterController;
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
|
||||||
|
Route::prefix('auth/')->name('auth.')->middleware('guest')->group(function (){
|
||||||
|
Route::get('login' , [LoginController::class , 'index'])->name('login');
|
||||||
|
Route::get('register' , [RegisterController::class , 'index'])->name('register');
|
||||||
|
});
|
||||||
@@ -4,3 +4,5 @@ use App\Http\Controllers\IndexController;
|
|||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::get('/' , [IndexController::class , 'index']);
|
Route::get('/' , [IndexController::class , 'index']);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user