Skip to content
This repository was archived by the owner on Apr 4, 2026. It is now read-only.

Commit b4a03e4

Browse files
authored
Merge pull request #27 from techdiary-dev/nova
upgrate to laravel 10 and remove backpack-admin
2 parents 72fabfc + 4c91400 commit b4a03e4

4,066 files changed

Lines changed: 10270 additions & 550052 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.DS_Store‎

6 KB
Binary file not shown.

‎Procfile‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎README.md‎

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,66 @@
1-
# api.techdiary.dev
1+
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
22

3-
[![Laravel Forge Site Deployment Status](https://img.shields.io/endpoint?url=https%3A%2F%2Fforge.laravel.com%2Fsite-badges%2F65f1a8de-81d0-47c7-af0b-d1650edca8c2%3Fdate%3D1%26commit%3D1&style=flat-square)](https://forge.laravel.com)
3+
<p align="center">
4+
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
5+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
7+
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
8+
</p>
9+
10+
## About Laravel
11+
12+
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
13+
14+
- [Simple, fast routing engine](https://laravel.com/docs/routing).
15+
- [Powerful dependency injection container](https://laravel.com/docs/container).
16+
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
17+
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
18+
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
19+
- [Robust background job processing](https://laravel.com/docs/queues).
20+
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
21+
22+
Laravel is accessible, powerful, and provides tools required for large, robust applications.
23+
24+
## Learning Laravel
25+
26+
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
27+
28+
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
29+
30+
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
31+
32+
## Laravel Sponsors
33+
34+
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
35+
36+
### Premium Partners
37+
38+
- **[Vehikl](https://vehikl.com/)**
39+
- **[Tighten Co.](https://tighten.co)**
40+
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
41+
- **[64 Robots](https://64robots.com)**
42+
- **[Cubet Techno Labs](https://cubettech.com)**
43+
- **[Cyber-Duck](https://cyber-duck.co.uk)**
44+
- **[Many](https://www.many.co.uk)**
45+
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
46+
- **[DevSquad](https://devsquad.com)**
47+
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
48+
- **[OP.GG](https://op.gg)**
49+
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
50+
- **[Lendio](https://lendio.com)**
51+
52+
## Contributing
53+
54+
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
55+
56+
## Code of Conduct
57+
58+
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
59+
60+
## Security Vulnerabilities
61+
62+
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
63+
64+
## License
65+
66+
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

‎app/Actions/Fortify/CreateNewUser.php‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ class CreateNewUser implements CreatesNewUsers
1515
/**
1616
* Validate and create a newly registered user.
1717
*
18-
* @return \App\Models\User
18+
* @param array<string, string> $input
1919
*/
20-
public function create(array $input)
20+
public function create(array $input): User
2121
{
2222
Validator::make($input, [
2323
'name' => ['required', 'string', 'max:255'],
24-
'username' => ['required', 'string', 'max:255', Rule::unique(User::class)],
2524
'email' => [
2625
'required',
2726
'string',
@@ -34,7 +33,6 @@ public function create(array $input)
3433

3534
return User::create([
3635
'name' => $input['name'],
37-
'username' => $input['username'],
3836
'email' => $input['email'],
3937
'password' => Hash::make($input['password']),
4038
]);

‎app/Actions/Fortify/PasswordValidationRules.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ trait PasswordValidationRules
99
/**
1010
* Get the validation rules used to validate passwords.
1111
*
12-
* @return array
12+
* @return array<int, \Illuminate\Contracts\Validation\Rule|array|string>
1313
*/
14-
protected function passwordRules()
14+
protected function passwordRules(): array
1515
{
1616
return ['required', 'string', new Password, 'confirmed'];
1717
}

‎app/Actions/Fortify/ResetUserPassword.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Actions\Fortify;
44

5+
use App\Models\User;
56
use Illuminate\Support\Facades\Hash;
67
use Illuminate\Support\Facades\Validator;
78
use Laravel\Fortify\Contracts\ResetsUserPasswords;
@@ -13,10 +14,9 @@ class ResetUserPassword implements ResetsUserPasswords
1314
/**
1415
* Validate and reset the user's forgotten password.
1516
*
16-
* @param mixed $user
17-
* @return void
17+
* @param array<string, string> $input
1818
*/
19-
public function reset($user, array $input)
19+
public function reset(User $user, array $input): void
2020
{
2121
Validator::make($input, [
2222
'password' => $this->passwordRules(),

‎app/Actions/Fortify/UpdateUserPassword.php‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Actions\Fortify;
44

5+
use App\Models\User;
56
use Illuminate\Support\Facades\Hash;
67
use Illuminate\Support\Facades\Validator;
78
use Laravel\Fortify\Contracts\UpdatesUserPasswords;
@@ -13,19 +14,16 @@ class UpdateUserPassword implements UpdatesUserPasswords
1314
/**
1415
* Validate and update the user's password.
1516
*
16-
* @param mixed $user
17-
* @return void
17+
* @param array<string, string> $input
1818
*/
19-
public function update($user, array $input)
19+
public function update(User $user, array $input): void
2020
{
2121
Validator::make($input, [
22-
'current_password' => ['required', 'string'],
22+
'current_password' => ['required', 'string', 'current_password:web'],
2323
'password' => $this->passwordRules(),
24-
])->after(function ($validator) use ($user, $input) {
25-
if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) {
26-
$validator->errors()->add('current_password', __('The provided password does not match your current password.'));
27-
}
28-
})->validateWithBag('updatePassword');
24+
], [
25+
'current_password.current_password' => __('The provided password does not match your current password.'),
26+
])->validateWithBag('updatePassword');
2927

3028
$user->forceFill([
3129
'password' => Hash::make($input['password']),

‎app/Actions/Fortify/UpdateUserProfileInformation.php‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,24 @@
22

33
namespace App\Actions\Fortify;
44

5+
use App\Models\User;
56
use Illuminate\Contracts\Auth\MustVerifyEmail;
67
use Illuminate\Support\Facades\Validator;
78
use Illuminate\Validation\Rule;
8-
use Illuminate\Validation\ValidationException;
99
use Laravel\Fortify\Contracts\UpdatesUserProfileInformation;
1010

1111
class UpdateUserProfileInformation implements UpdatesUserProfileInformation
1212
{
1313
/**
1414
* Validate and update the given user's profile information.
1515
*
16-
* @param mixed $user
17-
* @return void
18-
*
19-
* @throws ValidationException
16+
* @param array<string, string> $input
2017
*/
21-
public function update($user, array $input)
18+
public function update(User $user, array $input): void
2219
{
2320
Validator::make($input, [
2421
'name' => ['required', 'string', 'max:255'],
22+
2523
'email' => [
2624
'required',
2725
'string',
@@ -45,10 +43,9 @@ public function update($user, array $input)
4543
/**
4644
* Update the given verified user's profile information.
4745
*
48-
* @param mixed $user
49-
* @return void
46+
* @param array<string, string> $input
5047
*/
51-
protected function updateVerifiedUser($user, array $input)
48+
protected function updateVerifiedUser(User $user, array $input): void
5249
{
5350
$user->forceFill([
5451
'name' => $input['name'],

‎app/Console/Kernel.php‎

100755100644
Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,18 @@
77

88
class Kernel extends ConsoleKernel
99
{
10-
/**
11-
* The Artisan commands provided by your application.
12-
*
13-
* @var array
14-
*/
15-
protected $commands = [
16-
//
17-
];
18-
1910
/**
2011
* Define the application's command schedule.
21-
*
22-
* @return void
2312
*/
24-
protected function schedule(Schedule $schedule)
13+
protected function schedule(Schedule $schedule): void
2514
{
2615
// $schedule->command('inspire')->hourly();
2716
}
2817

2918
/**
3019
* Register the commands for the application.
31-
*
32-
* @return void
3320
*/
34-
protected function commands()
21+
protected function commands(): void
3522
{
3623
$this->load(__DIR__.'/Commands');
3724

‎app/Events/NewUserCreated.php‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)