Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
84ca2e1
hapus migration yang tidak digunakan
aadiityaak Oct 26, 2024
b658075
tambah table customers
aadiityaak Oct 29, 2024
f4fd282
ganti breeze
aadiityaak Oct 31, 2024
8125e78
matikan pengecualian
aadiityaak Oct 31, 2024
8c5265f
pembuatan tabel customer
aadiityaak Nov 1, 2024
edbb2b5
melengkapi controller customer
aadiityaak Nov 2, 2024
dacd18a
tambah seeder
aadiityaak Nov 2, 2024
97b4347
update .env.example
aadiityaak Nov 4, 2024
5006e94
update seeder
aadiityaak Nov 4, 2024
282dc88
tambah profile controller
aadiityaak Nov 4, 2024
b61cdf3
perbaikan seeder
aadiityaak Nov 4, 2024
15225d9
perbaikan seeder
aadiityaak Nov 4, 2024
919770f
hapus avatar saat update
aadiityaak Nov 5, 2024
439e151
tambah tabel order
aadiityaak Nov 6, 2024
c4e4646
tambah customer pagination
aadiityaak Nov 6, 2024
b26f4a0
tambah pagination order
aadiityaak Nov 6, 2024
b787602
penambahan controller karyawan
aadiityaak Nov 7, 2024
fe6ca10
perbaikan controller karyawan
aadiityaak Nov 7, 2024
c089cdc
memisah validasi karyawan
aadiityaak Nov 8, 2024
1f96175
tambah beberapa kondisi
aadiityaak Nov 8, 2024
bd83d1d
change app_url
aadiityaak Nov 20, 2024
c1bd603
tambah tabel jobdesk
aadiityaak Nov 21, 2024
b19514d
ganti jobdesks table
aadiityaak Nov 25, 2024
f2b5741
add filter order
aadiityaak Nov 26, 2024
5f123bf
edit seeder
aadiityaak Nov 28, 2024
3cf3547
handle search
aadiityaak Nov 29, 2024
59a0dde
ganti query url
aadiityaak Nov 30, 2024
a1a365e
Nambah Filter Customer
Iimamtzh Dec 6, 2024
651abeb
add logic tanggal pengerjaan
aadiityaak Dec 7, 2024
595f834
Add and point jobdesk masuk
Iimamtzh Dec 10, 2024
e1b727a
add dashboard controller
aadiityaak Dec 13, 2024
9810f50
add dashboard data
aadiityaak Dec 13, 2024
c2b2d70
Tambah data karyawan
Iimamtzh Dec 13, 2024
79047e0
add bulanan in array
aadiityaak Dec 14, 2024
b2b6d81
add setting endpoin
aadiityaak Dec 14, 2024
066e141
gabungin controller
aadiityaak Dec 14, 2024
0396785
fix status request
aadiityaak Dec 15, 2024
bcbffc9
add pending jobdesk
aadiityaak Dec 16, 2024
20b16fe
add notification table
aadiityaak Dec 17, 2024
003eeb2
fix jobdesk end point
aadiityaak Dec 17, 2024
3dd836d
add all karyawan response
aadiityaak Dec 17, 2024
d26936c
add update & store
aadiityaak Dec 17, 2024
e478d7c
fix
aadiityaak Dec 18, 2024
cd47cd0
Merge branch 'notaris' of https://github.com/aadiityaak/larapi into n…
aadiityaak Dec 18, 2024
9b4979f
add date condition
aadiityaak Dec 18, 2024
818059a
fix order controller
aadiityaak Dec 19, 2024
c2ffb3b
fix upload document
aadiityaak Dec 20, 2024
f181fe0
fix lampiran
aadiityaak Dec 20, 2024
1cdd658
tambah condition order
aadiityaak Dec 20, 2024
8d875cf
jobdesk
aadiityaak Dec 23, 2024
c4e0a1f
fix migration in server
aadiityaak Dec 26, 2024
2827d9c
delete jobdesk by customer
aadiityaak Dec 30, 2024
7da1180
public sementara
aadiityaak Dec 30, 2024
23737b4
convert is admin to string
aadiityaak Dec 31, 2024
7c2b9c7
fix karyawan store
aadiityaak Dec 31, 2024
7164852
fix filter karyawan
aadiityaak Dec 31, 2024
103581a
update setting seeder
aadiityaak Jan 2, 2025
c491ab8
get setting by key
aadiityaak Jan 3, 2025
9076196
delete some customer field
aadiityaak Jan 7, 2025
3801150
fix customer delete
aadiityaak Jan 8, 2025
184396c
update order
aadiityaak Jan 8, 2025
fb266f6
add table data & product
aadiityaak Jan 8, 2025
1d58634
rename table
aadiityaak Jan 8, 2025
cca3001
membuat model relasi
aadiityaak Jan 8, 2025
6a3b832
fix pivot data product
aadiityaak Jan 9, 2025
68d2c3f
Fix crud product
aadiityaak Jan 9, 2025
b11e903
change structure table
aadiityaak Jan 9, 2025
54121c9
update seeder
aadiityaak Jan 10, 2025
f71165c
data product
aadiityaak Jan 10, 2025
b09e480
add relation order
aadiityaak Jan 11, 2025
271a732
rename pagination
aadiityaak Jan 12, 2025
e6a1fc6
add notif
aadiityaak Jan 16, 2025
5aa37b3
fix crud notification template
aadiityaak Jan 17, 2025
b34549b
fix notif controller
aadiityaak Jan 17, 2025
969acc3
fix end poin notif
aadiityaak Jan 17, 2025
a7e5473
fix seeder product
aadiityaak Jan 18, 2025
3353f16
remove jobdesk collumn
aadiityaak Jan 19, 2025
a09f32a
fix jobdesk controller
aadiityaak Jan 20, 2025
04cb90c
fix notification table
aadiityaak Jan 20, 2025
22fac36
change toDatabase data
aadiityaak Jan 20, 2025
0271ef3
change data notification format
aadiityaak Jan 20, 2025
96285f3
fix order controller
aadiityaak Jan 20, 2025
f1cd492
fix unique phone
aadiityaak Jan 21, 2025
3c72119
add description in jobdesk
aadiityaak Jan 21, 2025
13f30cb
change variable user id
aadiityaak Jan 22, 2025
b8e5b1f
fix paginate typo
aadiityaak Jan 23, 2025
260874b
add nomer order
aadiityaak Jan 23, 2025
1cd4aeb
fix filter order
aadiityaak Jan 23, 2025
d3db13a
fix table structure
aadiityaak Jan 24, 2025
85f6011
Rename data to meta
aadiityaak Jan 24, 2025
3aea0d5
fix order controller
aadiityaak Jan 24, 2025
c2d054f
fix product controller
aadiityaak Jan 25, 2025
3c59703
fix response
aadiityaak Jan 27, 2025
1114c2f
fix jobdesk controller
aadiityaak Jan 27, 2025
8d71ae7
fix jobdesk controller
aadiityaak Jan 28, 2025
e346874
show all status
aadiityaak Jan 28, 2025
bd6944a
fix meta crud
aadiityaak Jan 28, 2025
6fa3ea5
fix product controller
aadiityaak Jan 28, 2025
21cfb27
change karyawan controller
aadiityaak Jan 28, 2025
aec4fdf
fix server compatible
aadiityaak Jan 28, 2025
4921ae4
fix jobdesk controller
aadiityaak Jan 28, 2025
2f91492
fix customer preview
aadiityaak Jan 29, 2025
94e654b
fix jobdesk model typo
aadiityaak Jan 29, 2025
607ede5
Hide sensitif data on staff
aadiityaak Jan 29, 2025
0c83bf5
perbaikan order & tipe data
aadiityaak Jan 30, 2025
fdd1d00
fix dashboard ui
aadiityaak Jan 31, 2025
331f846
update seeder & remove
aadiityaak Feb 2, 2025
39c7689
remove product price
aadiityaak Feb 3, 2025
b3047d2
fix new seeder stucture
aadiityaak Feb 3, 2025
16c0694
fix controller customer
aadiityaak Feb 3, 2025
01d565e
Merge branch 'notaris' of https://github.com/aadiityaak/larapi into n…
aadiityaak Feb 3, 2025
504e791
ix database seeder
aadiityaak Feb 3, 2025
2648fc9
fix delete customer & user policy
aadiityaak Feb 7, 2025
f6efecd
penanggung jawab hanyaa keluar staff
aadiityaak Feb 7, 2025
63fd6c4
Merge branch 'notaris' of https://github.com/aadiityaak/larapi into n…
aadiityaak Feb 7, 2025
7705cf8
fix tipedata is admin
aadiityaak Feb 7, 2025
5f5664c
format tanggal ganti pakai carbon
aadiityaak Feb 7, 2025
86909bb
fix filter product
aadiityaak Feb 8, 2025
65e220f
fix upload document
aadiityaak Feb 8, 2025
b6d6bcc
fix seeder to trial notif
aadiityaak Feb 10, 2025
04e09b9
add build feature
aadiityaak Feb 10, 2025
7225eb6
fix email notification
aadiityaak Feb 13, 2025
0c00f6d
fix email notification
aadiityaak Feb 13, 2025
0e7f3fa
set url in notification
aadiityaak Feb 13, 2025
eb1ccc7
jobdesk notification
aadiityaak Feb 13, 2025
396eed5
ignore package-lock.json
aadiityaak Feb 13, 2025
1d69f95
fix order kosong saat undefine
aadiityaak Feb 15, 2025
94d1e2a
menambah meta customer
aadiityaak Feb 17, 2025
362deb3
add permision controller
aadiityaak Feb 17, 2025
7624c78
add controller bank
aadiityaak Feb 18, 2025
96c4379
fix customer bank meta
aadiityaak Feb 18, 2025
7ba43c1
add filter in customer controller
aadiityaak Feb 18, 2025
cf02190
add filter bank in order controller
aadiityaak Feb 19, 2025
d80288b
ganti kondisi where menjadi sama persis
aadiityaak Feb 19, 2025
4bb7fc3
fix order query
aadiityaak Feb 20, 2025
bd9e957
add setting image support
aadiityaak Feb 21, 2025
2d4f268
add background controller
aadiityaak Feb 21, 2025
36022fe
add icon setting
aadiityaak Feb 25, 2025
3be89da
perapian route api
aadiityaak Feb 25, 2025
0d892f9
Update controller setting background
aadiityaak Feb 27, 2025
671734b
ganti penamaan controller
aadiityaak Feb 28, 2025
ef431fb
add crud post
aadiityaak Feb 28, 2025
7e0ff50
fix image post
aadiityaak Mar 1, 2025
a4d581e
fix source gambar
aadiityaak Mar 3, 2025
2905624
max lampiran 15 MB
aadiityaak Mar 4, 2025
3a11cf6
add categori to post controller
aadiityaak Mar 10, 2025
e067952
add list jobdesk in karyawan controller
aadiityaak Mar 11, 2025
4a5429c
add data jobdesk in karyawan
aadiityaak Mar 11, 2025
8b5c4c1
add validasi bckend
aadiityaak Mar 19, 2025
b2ef18d
fix lampiran url
aadiityaak Mar 27, 2025
2f860aa
allow jpg in favicon
aadiityaak Apr 11, 2025
0c8bfa9
fix pdf preview
aadiityaak Apr 15, 2025
9e32213
add consumen register date to API
aadiityaak Apr 22, 2025
4c507ed
Merge branch 'notaris' of https://github.com/aadiityaak/larapi into n…
aadiityaak Apr 22, 2025
cafb0e2
add validation message customer api
aadiityaak Apr 22, 2025
72bb8c3
fix filter by date
aadiityaak Apr 23, 2025
f389e07
add date filter jobdesk
aadiityaak Apr 24, 2025
22da051
add default background
aadiityaak Apr 24, 2025
71b31bc
fox filter by date
aadiityaak Apr 28, 2025
f7c40b8
Update sedder
Iimamtzh May 9, 2025
8dcfcbf
add role
aadiityaak May 23, 2025
fb01e41
fix database
aadiityaak May 23, 2025
59f45a3
remove jobdesk factory
aadiityaak May 23, 2025
98d39c6
rename jobdesk factory
aadiityaak May 23, 2025
f6f72d3
add role controller
aadiityaak May 24, 2025
38393b9
fix permision
aadiityaak May 24, 2025
b7b4563
change position to role
aadiityaak May 25, 2025
adfd68e
fix migration & seeder
aadiityaak May 25, 2025
a0f3d25
change role method
aadiityaak May 25, 2025
98238f0
add admin seeder
aadiityaak Jun 4, 2025
3981030
update karywan role controller
aadiityaak Jun 4, 2025
903b630
update user policy
aadiityaak Jul 18, 2025
1098bf3
change update user capability
aadiityaak Jul 18, 2025
ce29041
add post seeder
aadiityaak Jul 26, 2025
35a9eed
update jobdesk controller
aadiityaak Jul 26, 2025
993b62e
add seeder notification
aadiityaak Jul 27, 2025
ef763ba
update setting controller
aadiityaak Jul 27, 2025
6a2be25
add email notifications
aadiityaak Aug 7, 2025
08dafff
add data customer in relation with order
aadiityaak Aug 7, 2025
0262bfe
perbaikan konfirmasi hapus jobdesk
aadiityaak Aug 19, 2025
b427e01
perbaikan pagination jobdesk
aadiityaak Aug 19, 2025
c3d739f
change default order
aadiityaak Aug 19, 2025
3a56da5
include type data
aadiityaak Sep 2, 2025
f85d2db
feat(DashboardController): add date range filtering for dashboard met…
aadiityaak Sep 18, 2025
eaa19e7
build: add tailwindcss dependency and bump version to 1.0.1
aadiityaak Sep 18, 2025
f001565
feat(DashboardController): add 30-day jobdesk trend data
aadiityaak Sep 20, 2025
c7f0bb9
feat(seeder): add detailed order seeder with customer and meta data
aadiityaak Nov 25, 2025
783bdbb
refactor(seeders): optimize order and customer seeding logic
aadiityaak Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_KEY=base64:tMiKdI/3GuqLAKyBIe+Mv8cdrM04xfP/Onbvbtofc7A=
APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost
APP_TIMEZONE=Asia/Jakarta
APP_URL=http://localhost:8000
FRONTEND_URL=http://localhost:3000
SANCTUM_STATEFUL_DOMAIN=localhost:3000

APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US
APP_LOCALE=id
APP_FALLBACK_LOCALE=id
APP_FAKER_LOCALE=id_ID

APP_MAINTENANCE_DRIVER=file
# APP_MAINTENANCE_STORE=database

PHP_CLI_SERVER_WORKERS=4

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
Expand Down Expand Up @@ -61,4 +65,4 @@ AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"
VITE_APP_NAME="${APP_NAME}"
12 changes: 12 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: issues

on:
issues:
types: [labeled]

permissions:
issues: write

jobs:
help-wanted:
uses: laravel/.github/.github/workflows/issues.yml@main
12 changes: 12 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: pull requests

on:
pull_request_target:
types: [opened]

permissions:
pull-requests: write

jobs:
uneditable:
uses: laravel/.github/.github/workflows/pull-requests.yml@main
47 changes: 47 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tests

on:
push:
branches:
- master
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]

name: PHP ${{ matrix.php }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none

- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress

- name: Copy environment file
run: cp .env.example .env

- name: Generate app key
run: php artisan key:generate

- name: Execute tests
run: vendor/bin/phpunit
13 changes: 13 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: update changelog

on:
release:
types: [released]

permissions: {}

jobs:
update:
permissions:
contents: write
uses: laravel/.github/.github/workflows/update-changelog.yml@main
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
/public/hot
/public/storage
/storage/*.key
/storage/pail
/vendor
/dist
.env
.env.backup
.env.production
Expand All @@ -15,6 +17,8 @@ Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
package-lock.json
vscode
/.fleet
/.idea
/.vscode
Expand Down
9 changes: 9 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
php:
preset: laravel
disabled:
- no_unused_imports
finder:
not-name:
- index.php
js: true
css: true
92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Release Notes

## [Unreleased](https://github.com/laravel/laravel/compare/v11.3.1...11.x)

## [v11.3.1](https://github.com/laravel/laravel/compare/v11.3.0...v11.3.1) - 2024-10-15

**Full Changelog**: https://github.com/laravel/laravel/compare/v11.3.0...v11.3.1

## [v11.3.0](https://github.com/laravel/laravel/compare/v11.2.1...v11.3.0) - 2024-10-14

* Add Tailwind, "composer run dev" by [@taylorotwell](https://github.com/taylorotwell) in https://github.com/laravel/laravel/pull/6463

## [v11.2.1](https://github.com/laravel/laravel/compare/v11.2.0...v11.2.1) - 2024-10-08

* [11.x] Collision Version Upgrade by [@amdad121](https://github.com/amdad121) in https://github.com/laravel/laravel/pull/6454
* [11.x] factory-generics-in-user-model by [@MrPunyapal](https://github.com/MrPunyapal) in https://github.com/laravel/laravel/pull/6453
* Update welcome.blade.php to add missing alt tag by [@mezotv](https://github.com/mezotv) in https://github.com/laravel/laravel/pull/6462

## [v11.2.0](https://github.com/laravel/laravel/compare/v11.1.5...v11.2.0) - 2024-09-11

* Update .gitignore with Zed Editor by [@fahadkhan1740](https://github.com/fahadkhan1740) in https://github.com/laravel/laravel/pull/6449
* Laracon 2024 feature update by [@taylorotwell](https://github.com/taylorotwell) in https://github.com/laravel/laravel/pull/6450

## [v11.1.5](https://github.com/laravel/laravel/compare/v11.1.4...v11.1.5) - 2024-08-14

* Update axios by [@laserhybiz](https://github.com/laserhybiz) in https://github.com/laravel/laravel/pull/6440

## [v11.1.4](https://github.com/laravel/laravel/compare/v11.1.3...v11.1.4) - 2024-07-16

**Full Changelog**: https://github.com/laravel/laravel/compare/v11.1.3...v11.1.4

## [v11.1.3](https://github.com/laravel/laravel/compare/v11.1.2...v11.1.3) - 2024-07-03

* [11.x] Comment maintenance store by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/laravel/pull/6429

## [v11.1.2](https://github.com/laravel/laravel/compare/v11.1.1...v11.1.2) - 2024-06-20

* Expose lock table name by [@nhedger](https://github.com/nhedger) in https://github.com/laravel/laravel/pull/6423

## [v11.1.1](https://github.com/laravel/laravel/compare/v11.1.0...v11.1.1) - 2024-06-04

* Format the first letter of `drivers` to lowercase by [@maru0914](https://github.com/maru0914) in https://github.com/laravel/laravel/pull/6413

## [v11.1.0](https://github.com/laravel/laravel/compare/v11.0.9...v11.1.0) - 2024-05-28

* [11.x] Removes `--dev` dependencies by [@nunomaduro](https://github.com/nunomaduro) in https://github.com/laravel/laravel/pull/6406

## [v11.0.9](https://github.com/laravel/laravel/compare/v11.0.8...v11.0.9) - 2024-05-16

* Updated SMTP mail config to use a valid EHLO domain by [@rcerljenko](https://github.com/rcerljenko) in https://github.com/laravel/laravel/pull/6402

## [v11.0.8](https://github.com/laravel/laravel/compare/v11.0.7...v11.0.8) - 2024-05-13

* Add .phpactor.json to .gitignore by [@princejohnsantillan](https://github.com/princejohnsantillan) in https://github.com/laravel/laravel/pull/6400

## [v11.0.7](https://github.com/laravel/laravel/compare/v11.0.6...v11.0.7) - 2024-05-03

* Remove obsolete driver option by [@u01jmg3](https://github.com/u01jmg3) in https://github.com/laravel/laravel/pull/6395

## [v11.0.6](https://github.com/laravel/laravel/compare/v11.0.5...v11.0.6) - 2024-04-09

* Fix PHPUnit constraint by [@szepeviktor](https://github.com/szepeviktor) in https://github.com/laravel/laravel/pull/6389
* [11.x] Add missing roundrobin transport driver config by [@u01jmg3](https://github.com/u01jmg3) in https://github.com/laravel/laravel/pull/6392

## [v11.0.5](https://github.com/laravel/laravel/compare/v11.0.4...v11.0.5) - 2024-03-26

* [11.x] Use PHPUnit v11 by [@philbates35](https://github.com/philbates35) in https://github.com/laravel/laravel/pull/6385

## [v11.0.4](https://github.com/laravel/laravel/compare/v11.0.3...v11.0.4) - 2024-03-15

* [11.x] Removed useless null parameter for env helper (cache.php) by [@siarheipashkevich](https://github.com/siarheipashkevich) in https://github.com/laravel/laravel/pull/6374
* [11.x] Removed useless null parameter for env helper (queue.php) by [@siarheipashkevich](https://github.com/siarheipashkevich) in https://github.com/laravel/laravel/pull/6373
* [11.x] Fix retry_after to be an integer by [@driesvints](https://github.com/driesvints) in https://github.com/laravel/laravel/pull/6377
* [11.x] Fix on hover animation and ring by [@michaelnabil230](https://github.com/michaelnabil230) in https://github.com/laravel/laravel/pull/6376

## [v11.0.3](https://github.com/laravel/laravel/compare/v11.0.2...v11.0.3) - 2024-03-14

* [11.x] Revert collation change by [@driesvints](https://github.com/driesvints) in https://github.com/laravel/laravel/pull/6372

## [v11.0.2](https://github.com/laravel/laravel/compare/v11.0.1...v11.0.2) - 2024-03-13

* [11.x] Remove branch alias from composer.json by [@zepfietje](https://github.com/zepfietje) in https://github.com/laravel/laravel/pull/6366
* [11.x] Fixes typo in welcome page by [@jrd-lewis](https://github.com/jrd-lewis) in https://github.com/laravel/laravel/pull/6363
* change mariadb default by [@taylorotwell](https://github.com/taylorotwell) in https://github.com/laravel/laravel/commit/79969c99c6456a6d6edfbe78d241575fe1f65594

## [v11.0.1](https://github.com/laravel/laravel/compare/v11.0.0...v11.0.1) - 2024-03-12

* [11.x] Fixes SQLite driver missing by [@nunomaduro](https://github.com/nunomaduro) in https://github.com/laravel/laravel/pull/6361

## [v11.0.0 (2023-02-17)](https://github.com/laravel/laravel/compare/v10.3.2...v11.0.0)

Laravel 11 includes a variety of changes to the application skeleton. Please consult the diff to see what's new.
38 changes: 38 additions & 0 deletions app/Http/Controllers/Auth/AuthenticatedSessionController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\LoginRequest;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth;

class AuthenticatedSessionController extends Controller
{
/**
* Handle an incoming authentication request.
*/
public function store(LoginRequest $request): Response
{
$request->authenticate();

$request->session()->regenerate();

return response()->noContent();
}

/**
* Destroy an authenticated session.
*/
public function destroy(Request $request): Response
{
Auth::guard('web')->logout();

$request->session()->invalidate();

$request->session()->regenerateToken();

return response()->noContent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;

class EmailVerificationSendNotificationController extends Controller
{
/**
* Send a new email verification notification.
*/
public function store(Request $request): JsonResponse|RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended('/dashboard');
}

$request->user()->sendEmailVerificationNotification();

return response()->json(['status' => 'verification-link-sent']);
}
}
53 changes: 53 additions & 0 deletions app/Http/Controllers/Auth/NewPasswordController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Auth\Events\PasswordReset;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Password;
use Illuminate\Support\Str;
use Illuminate\Validation\Rules;
use Illuminate\Validation\ValidationException;

class NewPasswordController extends Controller
{
/**
* Handle an incoming new password request.
*
* @throws \Illuminate\Validation\ValidationException
*/
public function store(Request $request): JsonResponse
{
$request->validate([
'token' => ['required'],
'email' => ['required', 'email'],
'password' => ['required', 'confirmed', Rules\Password::defaults()],
]);

// Here we will attempt to reset the user's password. If it is successful we
// will update the password on an actual user model and persist it to the
// database. Otherwise we will parse the error and return the response.
$status = Password::reset(
$request->only('email', 'password', 'password_confirmation', 'token'),
function ($user) use ($request) {
$user->forceFill([
'password' => Hash::make($request->string('password')),
'remember_token' => Str::random(60),
])->save();

event(new PasswordReset($user));
}
);

if ($status != Password::PASSWORD_RESET) {
throw ValidationException::withMessages([
'email' => [__($status)],
]);
}

return response()->json(['status' => __($status)]);
}
}
Loading