New Initial Commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[compose.yaml]
|
||||||
|
indent_size = 4
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
APP_NAME=Laravel
|
||||||
|
APP_ENV=local
|
||||||
|
APP_KEY=
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_URL=http://localhost
|
||||||
|
|
||||||
|
APP_LOCALE=en
|
||||||
|
APP_FALLBACK_LOCALE=en
|
||||||
|
APP_FAKER_LOCALE=en_US
|
||||||
|
|
||||||
|
APP_MAINTENANCE_DRIVER=file
|
||||||
|
# APP_MAINTENANCE_STORE=database
|
||||||
|
|
||||||
|
# PHP_CLI_SERVER_WORKERS=4
|
||||||
|
|
||||||
|
BCRYPT_ROUNDS=12
|
||||||
|
|
||||||
|
LOG_CHANNEL=stack
|
||||||
|
LOG_STACK=single
|
||||||
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
|
DB_CONNECTION=sqlite
|
||||||
|
# DB_HOST=127.0.0.1
|
||||||
|
# DB_PORT=3306
|
||||||
|
# DB_DATABASE=laravel
|
||||||
|
# DB_USERNAME=root
|
||||||
|
# DB_PASSWORD=
|
||||||
|
|
||||||
|
SESSION_DRIVER=database
|
||||||
|
SESSION_LIFETIME=120
|
||||||
|
SESSION_ENCRYPT=false
|
||||||
|
SESSION_PATH=/
|
||||||
|
SESSION_DOMAIN=null
|
||||||
|
|
||||||
|
BROADCAST_CONNECTION=log
|
||||||
|
FILESYSTEM_DISK=local
|
||||||
|
QUEUE_CONNECTION=database
|
||||||
|
|
||||||
|
CACHE_STORE=database
|
||||||
|
# CACHE_PREFIX=
|
||||||
|
|
||||||
|
MEMCACHED_HOST=127.0.0.1
|
||||||
|
|
||||||
|
REDIS_CLIENT=phpredis
|
||||||
|
REDIS_HOST=127.0.0.1
|
||||||
|
REDIS_PASSWORD=null
|
||||||
|
REDIS_PORT=6379
|
||||||
|
|
||||||
|
MAIL_MAILER=log
|
||||||
|
MAIL_SCHEME=null
|
||||||
|
MAIL_HOST=127.0.0.1
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_FROM_ADDRESS="hello@example.com"
|
||||||
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID=
|
||||||
|
AWS_SECRET_ACCESS_KEY=
|
||||||
|
AWS_DEFAULT_REGION=us-east-1
|
||||||
|
AWS_BUCKET=
|
||||||
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
|
VITE_APP_NAME="${APP_NAME}"
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
|
|
||||||
|
*.blade.php diff=html
|
||||||
|
*.css diff=css
|
||||||
|
*.html diff=html
|
||||||
|
*.md diff=markdown
|
||||||
|
*.php diff=php
|
||||||
|
|
||||||
|
/.github export-ignore
|
||||||
|
CHANGELOG.md export-ignore
|
||||||
|
.styleci.yml export-ignore
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
|
.env.backup
|
||||||
|
.env.production
|
||||||
|
.phpactor.json
|
||||||
|
.phpunit.result.cache
|
||||||
|
/.fleet
|
||||||
|
/.idea
|
||||||
|
/.nova
|
||||||
|
/.phpunit.cache
|
||||||
|
/.vscode
|
||||||
|
/.zed
|
||||||
|
/auth.json
|
||||||
|
/node_modules
|
||||||
|
/public/build
|
||||||
|
/public/hot
|
||||||
|
/public/storage
|
||||||
|
/storage/*.key
|
||||||
|
/storage/pail
|
||||||
|
/vendor
|
||||||
|
Homestead.json
|
||||||
|
Homestead.yaml
|
||||||
|
Thumbs.db
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
php:
|
||||||
|
preset: laravel
|
||||||
|
disabled:
|
||||||
|
- no_unused_imports
|
||||||
|
finder:
|
||||||
|
not-name:
|
||||||
|
- index.php
|
||||||
|
js: true
|
||||||
|
css: true
|
||||||
+126
@@ -0,0 +1,126 @@
|
|||||||
|
# Release Notes
|
||||||
|
|
||||||
|
## [Unreleased](https://github.com/laravel/laravel/compare/v12.10.0...12.x)
|
||||||
|
|
||||||
|
## [v12.10.0](https://github.com/laravel/laravel/compare/v12.9.1...v12.10.0) - 2025-11-04
|
||||||
|
|
||||||
|
* Add background driver by [@barryvdh](https://github.com/barryvdh) in https://github.com/laravel/laravel/pull/6699
|
||||||
|
|
||||||
|
## [v12.9.1](https://github.com/laravel/laravel/compare/v12.9.0...v12.9.1) - 2025-10-23
|
||||||
|
|
||||||
|
* [12.x] Replace Bootcamp with Laravel Learn by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6692
|
||||||
|
* [12.x] Comment out CLI workers for fresh applications by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/laravel/pull/6693
|
||||||
|
|
||||||
|
## [v12.9.0](https://github.com/laravel/laravel/compare/v12.8.0...v12.9.0) - 2025-10-21
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/laravel/laravel/compare/v12.8.0...v12.9.0
|
||||||
|
|
||||||
|
## [v12.8.0](https://github.com/laravel/laravel/compare/v12.7.1...v12.8.0) - 2025-10-20
|
||||||
|
|
||||||
|
* [12.x] Makes test suite using broadcast's `null` driver by [@nunomaduro](https://github.com/nunomaduro) in https://github.com/laravel/laravel/pull/6691
|
||||||
|
|
||||||
|
## [v12.7.1](https://github.com/laravel/laravel/compare/v12.7.0...v12.7.1) - 2025-10-15
|
||||||
|
|
||||||
|
* Added `failover` driver to the `queue` config comment. by [@sajjadhossainshohag](https://github.com/sajjadhossainshohag) in https://github.com/laravel/laravel/pull/6688
|
||||||
|
|
||||||
|
## [v12.7.0](https://github.com/laravel/laravel/compare/v12.6.0...v12.7.0) - 2025-10-14
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/laravel/laravel/compare/v12.6.0...v12.7.0
|
||||||
|
|
||||||
|
## [v12.6.0](https://github.com/laravel/laravel/compare/v12.5.0...v12.6.0) - 2025-10-02
|
||||||
|
|
||||||
|
* Fix setup script by [@goldmont](https://github.com/goldmont) in https://github.com/laravel/laravel/pull/6682
|
||||||
|
|
||||||
|
## [v12.5.0](https://github.com/laravel/laravel/compare/v12.4.0...v12.5.0) - 2025-09-30
|
||||||
|
|
||||||
|
* [12.x] Fix type casting for environment variables in config files by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6670
|
||||||
|
* Fix CVEs affecting vite by [@faissaloux](https://github.com/faissaloux) in https://github.com/laravel/laravel/pull/6672
|
||||||
|
* Update .editorconfig to target compose.yaml by [@fredikaputra](https://github.com/fredikaputra) in https://github.com/laravel/laravel/pull/6679
|
||||||
|
* Add pre-package-uninstall script to composer.json by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/laravel/pull/6681
|
||||||
|
|
||||||
|
## [v12.4.0](https://github.com/laravel/laravel/compare/v12.3.1...v12.4.0) - 2025-08-29
|
||||||
|
|
||||||
|
* [12.x] Add default Redis retry configuration by [@mateusjatenee](https://github.com/mateusjatenee) in https://github.com/laravel/laravel/pull/6666
|
||||||
|
|
||||||
|
## [v12.3.1](https://github.com/laravel/laravel/compare/v12.3.0...v12.3.1) - 2025-08-21
|
||||||
|
|
||||||
|
* [12.x] Bump Pint version by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6653
|
||||||
|
* [12.x] Making sure all related processed are closed when terminating the currently command by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6654
|
||||||
|
* [12.x] Use application name from configuration by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6655
|
||||||
|
* Bring back postAutoloadDump script by [@jasonvarga](https://github.com/jasonvarga) in https://github.com/laravel/laravel/pull/6662
|
||||||
|
|
||||||
|
## [v12.3.0](https://github.com/laravel/laravel/compare/v12.2.0...v12.3.0) - 2025-08-03
|
||||||
|
|
||||||
|
* Fix Critical Security Vulnerability in form-data Dependency by [@izzygld](https://github.com/izzygld) in https://github.com/laravel/laravel/pull/6645
|
||||||
|
* Revert "fix" by [@RobertBoes](https://github.com/RobertBoes) in https://github.com/laravel/laravel/pull/6646
|
||||||
|
* Change composer post-autoload-dump script to Artisan command by [@lmjhs](https://github.com/lmjhs) in https://github.com/laravel/laravel/pull/6647
|
||||||
|
|
||||||
|
## [v12.2.0](https://github.com/laravel/laravel/compare/v12.1.0...v12.2.0) - 2025-07-11
|
||||||
|
|
||||||
|
* Add Vite 7 support by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/laravel/pull/6639
|
||||||
|
|
||||||
|
## [v12.1.0](https://github.com/laravel/laravel/compare/v12.0.11...v12.1.0) - 2025-07-03
|
||||||
|
|
||||||
|
* [12.x] Disable nightwatch in testing by [@laserhybiz](https://github.com/laserhybiz) in https://github.com/laravel/laravel/pull/6632
|
||||||
|
* [12.x] Reorder environment variables in phpunit.xml for logical grouping by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6634
|
||||||
|
* Change to hyphenate prefixes and cookie names by [@u01jmg3](https://github.com/u01jmg3) in https://github.com/laravel/laravel/pull/6636
|
||||||
|
* [12.x] Fix type casting for environment variables in config files by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6637
|
||||||
|
|
||||||
|
## [v12.0.11](https://github.com/laravel/laravel/compare/v12.0.10...v12.0.11) - 2025-06-10
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/laravel/laravel/compare/v12.0.10...v12.0.11
|
||||||
|
|
||||||
|
## [v12.0.10](https://github.com/laravel/laravel/compare/v12.0.9...v12.0.10) - 2025-06-09
|
||||||
|
|
||||||
|
* fix alphabetical order by [@Khuthaily](https://github.com/Khuthaily) in https://github.com/laravel/laravel/pull/6627
|
||||||
|
* [12.x] Reduce redundancy and keeps the .gitignore file cleaner by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6629
|
||||||
|
* [12.x] Fix: Add void return type to satisfy Rector analysis by [@Aluisio-Pires](https://github.com/Aluisio-Pires) in https://github.com/laravel/laravel/pull/6628
|
||||||
|
|
||||||
|
## [v12.0.9](https://github.com/laravel/laravel/compare/v12.0.8...v12.0.9) - 2025-05-26
|
||||||
|
|
||||||
|
* [12.x] Remove apc by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6611
|
||||||
|
* [12.x] Add JSON Schema to package.json by [@martinbean](https://github.com/martinbean) in https://github.com/laravel/laravel/pull/6613
|
||||||
|
* Minor language update by [@woganmay](https://github.com/woganmay) in https://github.com/laravel/laravel/pull/6615
|
||||||
|
* Enhance .gitignore to exclude common OS and log files by [@mohammadRezaei1380](https://github.com/mohammadRezaei1380) in https://github.com/laravel/laravel/pull/6619
|
||||||
|
|
||||||
|
## [v12.0.8](https://github.com/laravel/laravel/compare/v12.0.7...v12.0.8) - 2025-05-12
|
||||||
|
|
||||||
|
* [12.x] Clean up URL formatting in README by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6601
|
||||||
|
|
||||||
|
## [v12.0.7](https://github.com/laravel/laravel/compare/v12.0.6...v12.0.7) - 2025-04-15
|
||||||
|
|
||||||
|
* Add `composer run test` command by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/laravel/pull/6598
|
||||||
|
* Partner Directory Changes in ReadME by [@joshcirre](https://github.com/joshcirre) in https://github.com/laravel/laravel/pull/6599
|
||||||
|
|
||||||
|
## [v12.0.6](https://github.com/laravel/laravel/compare/v12.0.5...v12.0.6) - 2025-04-08
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/laravel/laravel/compare/v12.0.5...v12.0.6
|
||||||
|
|
||||||
|
## [v12.0.5](https://github.com/laravel/laravel/compare/v12.0.4...v12.0.5) - 2025-04-02
|
||||||
|
|
||||||
|
* [12.x] Update `config/mail.php` to match the latest core configuration by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6594
|
||||||
|
|
||||||
|
## [v12.0.4](https://github.com/laravel/laravel/compare/v12.0.3...v12.0.4) - 2025-03-31
|
||||||
|
|
||||||
|
* Bump vite from 6.0.11 to 6.2.3 - Vulnerability patch by [@abdel-aouby](https://github.com/abdel-aouby) in https://github.com/laravel/laravel/pull/6586
|
||||||
|
* Bump vite from 6.2.3 to 6.2.4 by [@thinkverse](https://github.com/thinkverse) in https://github.com/laravel/laravel/pull/6590
|
||||||
|
|
||||||
|
## [v12.0.3](https://github.com/laravel/laravel/compare/v12.0.2...v12.0.3) - 2025-03-17
|
||||||
|
|
||||||
|
* Remove reverted change from CHANGELOG.md by [@AJenbo](https://github.com/AJenbo) in https://github.com/laravel/laravel/pull/6565
|
||||||
|
* Improves clarity in app.css file by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6569
|
||||||
|
* [12.x] Refactor: Structural improvement for clarity by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6574
|
||||||
|
* Bump axios from 1.7.9 to 1.8.2 - Vulnerability patch by [@abdel-aouby](https://github.com/abdel-aouby) in https://github.com/laravel/laravel/pull/6572
|
||||||
|
* [12.x] Remove Unnecessarily [@source](https://github.com/source) by [@AhmedAlaa4611](https://github.com/AhmedAlaa4611) in https://github.com/laravel/laravel/pull/6584
|
||||||
|
|
||||||
|
## [v12.0.2](https://github.com/laravel/laravel/compare/v12.0.1...v12.0.2) - 2025-03-04
|
||||||
|
|
||||||
|
* Make the github test action run out of the box independent of the choice of testing framework by [@ndeblauw](https://github.com/ndeblauw) in https://github.com/laravel/laravel/pull/6555
|
||||||
|
|
||||||
|
## [v12.0.1](https://github.com/laravel/laravel/compare/v12.0.0...v12.0.1) - 2025-02-24
|
||||||
|
|
||||||
|
* [12.x] prefer stable stability by [@pataar](https://github.com/pataar) in https://github.com/laravel/laravel/pull/6548
|
||||||
|
|
||||||
|
## [v12.0.0 (2025-??-??)](https://github.com/laravel/laravel/compare/v11.0.2...v12.0.0)
|
||||||
|
|
||||||
|
Laravel 12 includes a variety of changes to the application skeleton. Please consult the diff to see what's new.
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<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>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
|
||||||
|
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
|
||||||
|
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
|
||||||
|
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## About Laravel
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||||
|
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||||
|
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||||
|
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||||
|
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||||
|
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||||
|
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||||
|
|
||||||
|
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||||
|
|
||||||
|
## Learning Laravel
|
||||||
|
|
||||||
|
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. You can also check out [Laravel Learn](https://laravel.com/learn), where you will be guided through building a modern Laravel application.
|
||||||
|
|
||||||
|
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of 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.
|
||||||
|
|
||||||
|
## Laravel Sponsors
|
||||||
|
|
||||||
|
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 Partners program](https://partners.laravel.com).
|
||||||
|
|
||||||
|
### Premium Partners
|
||||||
|
|
||||||
|
- **[Vehikl](https://vehikl.com)**
|
||||||
|
- **[Tighten Co.](https://tighten.co)**
|
||||||
|
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||||
|
- **[64 Robots](https://64robots.com)**
|
||||||
|
- **[Curotec](https://www.curotec.com/services/technologies/laravel)**
|
||||||
|
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
|
||||||
|
- **[Redberry](https://redberry.international/laravel-development)**
|
||||||
|
- **[Active Logic](https://activelogic.com)**
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
## Security Vulnerabilities
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
|
use App\Filament\Resources\CategoryResource\Pages;
|
||||||
|
use App\Models\Category;
|
||||||
|
use Filament\Forms;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Actions;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class CategoryResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = Category::class;
|
||||||
|
|
||||||
|
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-tag';
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->schema([
|
||||||
|
Forms\Components\TextInput::make('name')
|
||||||
|
->required()
|
||||||
|
->maxLength(255),
|
||||||
|
Forms\Components\Textarea::make('description')
|
||||||
|
->maxLength(65535)
|
||||||
|
->columnSpanFull(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\TextColumn::make('name')
|
||||||
|
->searchable(),
|
||||||
|
Tables\Columns\TextColumn::make('products_count')
|
||||||
|
->counts('products')
|
||||||
|
->label('Products'),
|
||||||
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
|
->dateTime()
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->actions([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->bulkActions([
|
||||||
|
//
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => Pages\ManageCategories::route('/'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\CategoryResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\CategoryResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ManageRecords;
|
||||||
|
|
||||||
|
class ManageCategories extends ManageRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = CategoryResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\CreateAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTableActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\EditAction::make(),
|
||||||
|
Actions\DeleteAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
|
use App\Models\HeroImage;
|
||||||
|
use App\Filament\Resources\HeroImageResource\Pages;
|
||||||
|
use Filament\Forms;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Schemas\Components\Section;
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class HeroImageResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = HeroImage::class;
|
||||||
|
|
||||||
|
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-photo';
|
||||||
|
|
||||||
|
protected static ?string $navigationLabel = 'Hero Images';
|
||||||
|
|
||||||
|
protected static ?string $modelLabel = 'Hero Image';
|
||||||
|
|
||||||
|
protected static ?string $pluralModelLabel = 'Hero Images';
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->schema([
|
||||||
|
Forms\Components\Select::make('page')
|
||||||
|
->label('Page')
|
||||||
|
->options(HeroImage::getPages())
|
||||||
|
->required()
|
||||||
|
->helperText('Choose which page this hero image will appear on'),
|
||||||
|
|
||||||
|
Forms\Components\FileUpload::make('image_path')
|
||||||
|
->label('Hero Image')
|
||||||
|
->image()
|
||||||
|
->required()
|
||||||
|
->disk('public')
|
||||||
|
->directory('hero-images')
|
||||||
|
->maxSize(5120)
|
||||||
|
->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp', 'image/gif'])
|
||||||
|
->helperText('Upload a high-quality image (max 5MB). Recommended size: 1920x1080px'),
|
||||||
|
|
||||||
|
Forms\Components\TextInput::make('title')
|
||||||
|
->label('Heading')
|
||||||
|
->required()
|
||||||
|
->maxLength(255)
|
||||||
|
->helperText('Main heading text displayed on the hero image'),
|
||||||
|
|
||||||
|
Forms\Components\Textarea::make('description')
|
||||||
|
->label('Description')
|
||||||
|
->maxLength(500)
|
||||||
|
->rows(3)
|
||||||
|
->helperText('Subheading text displayed below the title'),
|
||||||
|
|
||||||
|
Forms\Components\TextInput::make('button_text')
|
||||||
|
->label('Button Text')
|
||||||
|
->maxLength(100)
|
||||||
|
->helperText('Text for the call-to-action button (optional)'),
|
||||||
|
|
||||||
|
Forms\Components\TextInput::make('button_link')
|
||||||
|
->label('Button Link')
|
||||||
|
->url()
|
||||||
|
->maxLength(255)
|
||||||
|
->helperText('URL or page anchor (e.g., #products or /products)'),
|
||||||
|
|
||||||
|
Forms\Components\TextInput::make('sort_order')
|
||||||
|
->label('Sort Order')
|
||||||
|
->numeric()
|
||||||
|
->default(0)
|
||||||
|
->helperText('Lower numbers appear first in the slider'),
|
||||||
|
|
||||||
|
Forms\Components\Toggle::make('is_active')
|
||||||
|
->label('Active')
|
||||||
|
->default(true)
|
||||||
|
->helperText('Disable to hide this image from the website'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\TextColumn::make('page')
|
||||||
|
->label('Page')
|
||||||
|
->sortable()
|
||||||
|
->formatStateUsing(fn($state) => HeroImage::getPages()[$state] ?? $state)
|
||||||
|
->badge(),
|
||||||
|
|
||||||
|
Tables\Columns\ImageColumn::make('image_path')
|
||||||
|
->label('Image')
|
||||||
|
->size(80),
|
||||||
|
|
||||||
|
Tables\Columns\TextColumn::make('title')
|
||||||
|
->label('Title')
|
||||||
|
->searchable()
|
||||||
|
->limit(50),
|
||||||
|
|
||||||
|
Tables\Columns\TextColumn::make('sort_order')
|
||||||
|
->label('Order')
|
||||||
|
->sortable()
|
||||||
|
->numeric(),
|
||||||
|
|
||||||
|
Tables\Columns\IconColumn::make('is_active')
|
||||||
|
->label('Active')
|
||||||
|
->boolean()
|
||||||
|
->sortable(),
|
||||||
|
|
||||||
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
|
->label('Created')
|
||||||
|
->dateTime('M d, Y')
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
Tables\Filters\SelectFilter::make('page')
|
||||||
|
->options(HeroImage::getPages()),
|
||||||
|
|
||||||
|
Tables\Filters\TernaryFilter::make('is_active')
|
||||||
|
->label('Active')
|
||||||
|
->native(false),
|
||||||
|
])
|
||||||
|
->actions([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->bulkActions([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->defaultSort('page', 'asc')
|
||||||
|
->defaultSort('sort_order', 'asc');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getRelations(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => Pages\ListHeroImages::route('/'),
|
||||||
|
'create' => Pages\CreateHeroImage::route('/create'),
|
||||||
|
'edit' => Pages\EditHeroImage::route('/{record}/edit'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\HeroImageResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\HeroImageResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
|
class CreateHeroImage extends CreateRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = HeroImageResource::class;
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\HeroImageResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\HeroImageResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\EditRecord;
|
||||||
|
|
||||||
|
class EditHeroImage extends EditRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = HeroImageResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\DeleteAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\HeroImageResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\HeroImageResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ListRecords;
|
||||||
|
|
||||||
|
class ListHeroImages extends ListRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = HeroImageResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\CreateAction::make()
|
||||||
|
->label('Add New Hero Image'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
|
use App\Filament\Resources\OrderResource\Pages;
|
||||||
|
use App\Models\Order;
|
||||||
|
use Filament\Forms;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Actions;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class OrderResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = Order::class;
|
||||||
|
|
||||||
|
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-shopping-bag';
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->schema([
|
||||||
|
Forms\Components\TextInput::make('order_number')
|
||||||
|
->required()
|
||||||
|
->disabled()
|
||||||
|
->maxLength(255),
|
||||||
|
Forms\Components\TextInput::make('customer_name')
|
||||||
|
->required()
|
||||||
|
->maxLength(255),
|
||||||
|
Forms\Components\TextInput::make('customer_email')
|
||||||
|
->email()
|
||||||
|
->required()
|
||||||
|
->maxLength(255),
|
||||||
|
Forms\Components\TextInput::make('customer_phone')
|
||||||
|
->tel()
|
||||||
|
->maxLength(20),
|
||||||
|
Forms\Components\Textarea::make('shipping_address')
|
||||||
|
->required()
|
||||||
|
->maxLength(500)
|
||||||
|
->columnSpanFull(),
|
||||||
|
Forms\Components\Textarea::make('notes')
|
||||||
|
->maxLength(500)
|
||||||
|
->columnSpanFull(),
|
||||||
|
Forms\Components\TextInput::make('total')
|
||||||
|
->required()
|
||||||
|
->numeric()
|
||||||
|
->prefix('R'),
|
||||||
|
Forms\Components\Select::make('status')
|
||||||
|
->options([
|
||||||
|
'pending' => 'Pending',
|
||||||
|
'processing' => 'Processing',
|
||||||
|
'completed' => 'Completed',
|
||||||
|
'cancelled' => 'Cancelled',
|
||||||
|
])
|
||||||
|
->required(),
|
||||||
|
Forms\Components\Select::make('payment_status')
|
||||||
|
->options([
|
||||||
|
'pending' => 'Pending',
|
||||||
|
'paid' => 'Paid',
|
||||||
|
'failed' => 'Failed',
|
||||||
|
])
|
||||||
|
->required(),
|
||||||
|
Forms\Components\TextInput::make('payment_method')
|
||||||
|
->maxLength(50),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\TextColumn::make('order_number')
|
||||||
|
->searchable(),
|
||||||
|
Tables\Columns\TextColumn::make('customer_name')
|
||||||
|
->searchable(),
|
||||||
|
Tables\Columns\TextColumn::make('customer_email')
|
||||||
|
->searchable(),
|
||||||
|
Tables\Columns\TextColumn::make('total')
|
||||||
|
->money('ZAR')
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('status')
|
||||||
|
->badge()
|
||||||
|
->color(fn (string $state): string => match ($state) {
|
||||||
|
'pending' => 'warning',
|
||||||
|
'processing' => 'info',
|
||||||
|
'completed' => 'success',
|
||||||
|
'cancelled' => 'danger',
|
||||||
|
}),
|
||||||
|
Tables\Columns\TextColumn::make('payment_status')
|
||||||
|
->badge()
|
||||||
|
->color(fn (string $state): string => match ($state) {
|
||||||
|
'pending' => 'warning',
|
||||||
|
'paid' => 'success',
|
||||||
|
'failed' => 'danger',
|
||||||
|
}),
|
||||||
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
|
->dateTime()
|
||||||
|
->sortable(),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
Tables\Filters\SelectFilter::make('status')
|
||||||
|
->options([
|
||||||
|
'pending' => 'Pending',
|
||||||
|
'processing' => 'Processing',
|
||||||
|
'completed' => 'Completed',
|
||||||
|
'cancelled' => 'Cancelled',
|
||||||
|
]),
|
||||||
|
Tables\Filters\SelectFilter::make('payment_status')
|
||||||
|
->options([
|
||||||
|
'pending' => 'Pending',
|
||||||
|
'paid' => 'Paid',
|
||||||
|
'failed' => 'Failed',
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->actions([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->bulkActions([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->defaultSort('created_at', 'desc');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getRelations(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => Pages\ListOrders::route('/'),
|
||||||
|
'create' => Pages\CreateOrder::route('/create'),
|
||||||
|
'view' => Pages\ViewOrder::route('/{record}'),
|
||||||
|
'edit' => Pages\EditOrder::route('/{record}/edit'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\OrderResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\OrderResource;
|
||||||
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
|
class CreateOrder extends CreateRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = OrderResource::class;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\OrderResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\OrderResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\EditRecord;
|
||||||
|
|
||||||
|
class EditOrder extends EditRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = OrderResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\ViewAction::make(),
|
||||||
|
Actions\DeleteAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\OrderResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\OrderResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ListRecords;
|
||||||
|
|
||||||
|
class ListOrders extends ListRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = OrderResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\CreateAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\OrderResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\OrderResource;
|
||||||
|
use App\Filament\Resources\OrderResource\Widgets\OrderItemsTable;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ViewRecord;
|
||||||
|
use Illuminate\Contracts\Support\Htmlable;
|
||||||
|
|
||||||
|
class ViewOrder extends ViewRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = OrderResource::class;
|
||||||
|
|
||||||
|
public function getTitle(): string
|
||||||
|
{
|
||||||
|
return 'Order #' . $this->record->order_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeading(): string | Htmlable
|
||||||
|
{
|
||||||
|
return 'Order #' . $this->record->order_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\EditAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getHeaderWidgets(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
OrderItemsTable::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHeaderWidgetsColumns(): int | array
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\OrderResource\Widgets;
|
||||||
|
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
use Filament\Widgets\TableWidget as BaseWidget;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class OrderItemsTable extends BaseWidget
|
||||||
|
{
|
||||||
|
public ?Model $record = null;
|
||||||
|
|
||||||
|
protected static ?string $heading = 'Order Items';
|
||||||
|
|
||||||
|
public function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->query(
|
||||||
|
fn () => $this->record->items()->getQuery()
|
||||||
|
)
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\TextColumn::make('product.name')
|
||||||
|
->label('Product'),
|
||||||
|
Tables\Columns\TextColumn::make('printStock.name')
|
||||||
|
->label('Print Stock')
|
||||||
|
->default('N/A'),
|
||||||
|
Tables\Columns\TextColumn::make('type')
|
||||||
|
->badge(),
|
||||||
|
Tables\Columns\TextColumn::make('specifications')
|
||||||
|
->label('Specifications')
|
||||||
|
->getStateUsing(function ($record) {
|
||||||
|
if ($record->type === 'wallpaper') {
|
||||||
|
return "Length: {$record->length}m";
|
||||||
|
} elseif ($record->type === 'mural') {
|
||||||
|
$area = number_format($record->width * $record->height, 2);
|
||||||
|
return "{$record->width}m × {$record->height}m ({$area}m²)";
|
||||||
|
}
|
||||||
|
return 'N/A';
|
||||||
|
}),
|
||||||
|
Tables\Columns\TextColumn::make('price')
|
||||||
|
->money('ZAR')
|
||||||
|
->alignEnd(),
|
||||||
|
])
|
||||||
|
->paginated(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
|
use App\Filament\Resources\PrintStockResource\Pages;
|
||||||
|
use App\Models\PrintStock;
|
||||||
|
use Filament\Forms;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Actions;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class PrintStockResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = PrintStock::class;
|
||||||
|
|
||||||
|
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-cube';
|
||||||
|
|
||||||
|
protected static ?string $navigationLabel = 'Print Stocks';
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->schema([
|
||||||
|
Forms\Components\TextInput::make('name')
|
||||||
|
->required()
|
||||||
|
->maxLength(255),
|
||||||
|
Forms\Components\Textarea::make('description')
|
||||||
|
->maxLength(65535)
|
||||||
|
->columnSpanFull(),
|
||||||
|
Forms\Components\TextInput::make('cost_per_meter')
|
||||||
|
->required()
|
||||||
|
->numeric()
|
||||||
|
->prefix('R')
|
||||||
|
->label('Cost per Meter'),
|
||||||
|
Forms\Components\TextInput::make('cost_per_m2')
|
||||||
|
->required()
|
||||||
|
->numeric()
|
||||||
|
->prefix('R')
|
||||||
|
->label('Cost per m²'),
|
||||||
|
Forms\Components\Select::make('type')
|
||||||
|
->options([
|
||||||
|
'wallpaper' => 'Wallpaper',
|
||||||
|
'mural' => 'Mural',
|
||||||
|
'both' => 'Both',
|
||||||
|
])
|
||||||
|
->required(),
|
||||||
|
Forms\Components\TextInput::make('width')
|
||||||
|
->label('Width (meters)')
|
||||||
|
->numeric()
|
||||||
|
->step(0.01)
|
||||||
|
->minValue(0.1)
|
||||||
|
->default(1)
|
||||||
|
->helperText('Width of wallpaper roll in meters'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\TextColumn::make('name')
|
||||||
|
->searchable(),
|
||||||
|
Tables\Columns\TextColumn::make('cost_per_meter')
|
||||||
|
->money('ZAR')
|
||||||
|
->label('Cost/m')
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('cost_per_m2')
|
||||||
|
->money('ZAR')
|
||||||
|
->label('Cost/m²')
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('type')
|
||||||
|
->badge()
|
||||||
|
->color(fn (string $state): string => match ($state) {
|
||||||
|
'wallpaper' => 'success',
|
||||||
|
'mural' => 'info',
|
||||||
|
'both' => 'warning',
|
||||||
|
}),
|
||||||
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
|
->dateTime()
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
Tables\Filters\SelectFilter::make('type')
|
||||||
|
->options([
|
||||||
|
'wallpaper' => 'Wallpaper',
|
||||||
|
'mural' => 'Mural',
|
||||||
|
'both' => 'Both',
|
||||||
|
]),
|
||||||
|
])
|
||||||
|
->actions([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->bulkActions([
|
||||||
|
//
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => Pages\ManagePrintStocks::route('/'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\PrintStockResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\PrintStockResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ManageRecords;
|
||||||
|
|
||||||
|
class ManagePrintStocks extends ManageRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = PrintStockResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\CreateAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTableActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\EditAction::make(),
|
||||||
|
Actions\DeleteAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources;
|
||||||
|
|
||||||
|
use App\Filament\Resources\ProductResource\Pages;
|
||||||
|
use App\Models\Product;
|
||||||
|
use Filament\Forms;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Schemas\Components\Section;
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Actions;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class ProductResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = Product::class;
|
||||||
|
|
||||||
|
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->schema([
|
||||||
|
Forms\Components\TextInput::make('name')
|
||||||
|
->required()
|
||||||
|
->maxLength(255),
|
||||||
|
Forms\Components\Select::make('category_id')
|
||||||
|
->relationship('category', 'name')
|
||||||
|
->required(),
|
||||||
|
Forms\Components\Textarea::make('description')
|
||||||
|
->maxLength(65535)
|
||||||
|
->columnSpanFull(),
|
||||||
|
Forms\Components\TextInput::make('price')
|
||||||
|
->required()
|
||||||
|
->numeric()
|
||||||
|
->prefix('R'),
|
||||||
|
Forms\Components\TextInput::make('stock')
|
||||||
|
->required()
|
||||||
|
->numeric()
|
||||||
|
->default(100),
|
||||||
|
Forms\Components\FileUpload::make('images')
|
||||||
|
->multiple()
|
||||||
|
->disk('public')
|
||||||
|
->directory('products')
|
||||||
|
->reorderable()
|
||||||
|
->maxSize(5120)
|
||||||
|
->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp']),
|
||||||
|
Forms\Components\Select::make('type')
|
||||||
|
->options([
|
||||||
|
'wallpaper' => 'Wallpaper',
|
||||||
|
'mural' => 'Mural',
|
||||||
|
])
|
||||||
|
->required(),
|
||||||
|
Forms\Components\Select::make('printStocks')
|
||||||
|
->relationship('printStocks', 'name')
|
||||||
|
->multiple()
|
||||||
|
->preload(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\ImageColumn::make('images.image_path')
|
||||||
|
->label('Image')
|
||||||
|
->disk('public')
|
||||||
|
->getStateUsing(function ($record) {
|
||||||
|
return $record->images->first()?->image_path;
|
||||||
|
})
|
||||||
|
->defaultImageUrl('/images/placeholder.png')
|
||||||
|
->circular()
|
||||||
|
->size(60),
|
||||||
|
Tables\Columns\TextColumn::make('name')
|
||||||
|
->searchable(),
|
||||||
|
Tables\Columns\TextColumn::make('category.name')
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('price')
|
||||||
|
->money('ZAR')
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('stock')
|
||||||
|
->numeric()
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('type')
|
||||||
|
->badge()
|
||||||
|
->color(fn (string $state): string => match ($state) {
|
||||||
|
'wallpaper' => 'success',
|
||||||
|
'mural' => 'info',
|
||||||
|
}),
|
||||||
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
|
->dateTime()
|
||||||
|
->sortable()
|
||||||
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
Tables\Filters\SelectFilter::make('type')
|
||||||
|
->options([
|
||||||
|
'wallpaper' => 'Wallpaper',
|
||||||
|
'mural' => 'Mural',
|
||||||
|
]),
|
||||||
|
Tables\Filters\SelectFilter::make('category')
|
||||||
|
->relationship('category', 'name'),
|
||||||
|
])
|
||||||
|
->actions([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->bulkActions([
|
||||||
|
//
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getRelations(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => Pages\ListProducts::route('/'),
|
||||||
|
'create' => Pages\CreateProduct::route('/create'),
|
||||||
|
'edit' => Pages\EditProduct::route('/{record}/edit'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\ProductResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\ProductResource;
|
||||||
|
use App\Models\ProductImage;
|
||||||
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
|
class CreateProduct extends CreateRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = ProductResource::class;
|
||||||
|
|
||||||
|
protected function mutateFormDataBeforeSave(array $data): array
|
||||||
|
{
|
||||||
|
// Store images in a temporary property
|
||||||
|
if (isset($data['images']) && is_array($data['images'])) {
|
||||||
|
$this->pendingImages = $data['images'];
|
||||||
|
}
|
||||||
|
unset($data['images']);
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function afterSave(): void
|
||||||
|
{
|
||||||
|
if (!isset($this->pendingImages)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($this->pendingImages as $index => $imagePath) {
|
||||||
|
ProductImage::create([
|
||||||
|
'product_id' => $this->record->id,
|
||||||
|
'image_path' => $imagePath,
|
||||||
|
'sort_order' => $index,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\ProductResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\ProductResource;
|
||||||
|
use App\Models\ProductImage;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\EditRecord;
|
||||||
|
|
||||||
|
class EditProduct extends EditRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = ProductResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\DeleteAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function mutateFormDataBeforeFill(array $data): array
|
||||||
|
{
|
||||||
|
// Load existing images for the form
|
||||||
|
$data['images'] = $this->record->images()->orderBy('sort_order')->pluck('image_path')->toArray();
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function mutateFormDataBeforeSave(array $data): array
|
||||||
|
{
|
||||||
|
// Store images for processing after save
|
||||||
|
$this->pendingImages = $data['images'] ?? [];
|
||||||
|
unset($data['images']);
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function afterSave(): void
|
||||||
|
{
|
||||||
|
if (!isset($this->pendingImages)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$newImages = $this->pendingImages;
|
||||||
|
$existingImages = $this->record->images()->pluck('image_path')->toArray();
|
||||||
|
|
||||||
|
// Find images to delete (in existing but not in new)
|
||||||
|
$imagesToDelete = array_diff($existingImages, $newImages);
|
||||||
|
foreach ($imagesToDelete as $imagePath) {
|
||||||
|
$this->record->images()->where('image_path', $imagePath)->delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add new images and update sort order
|
||||||
|
foreach ($newImages as $index => $imagePath) {
|
||||||
|
ProductImage::firstOrCreate(
|
||||||
|
[
|
||||||
|
'product_id' => $this->record->id,
|
||||||
|
'image_path' => $imagePath,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'sort_order' => $index,
|
||||||
|
]
|
||||||
|
)->update(['sort_order' => $index]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\ProductResource\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\ProductResource;
|
||||||
|
use Filament\Actions;
|
||||||
|
use Filament\Resources\Pages\ListRecords;
|
||||||
|
|
||||||
|
class ListProducts extends ListRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = ProductResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
Actions\CreateAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Widgets;
|
||||||
|
|
||||||
|
use App\Filament\Resources\OrderResource;
|
||||||
|
use App\Models\Order;
|
||||||
|
use Filament\Tables;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
use Filament\Widgets\TableWidget as BaseWidget;
|
||||||
|
|
||||||
|
class LatestOrders extends BaseWidget
|
||||||
|
{
|
||||||
|
protected static ?int $sort = 2;
|
||||||
|
|
||||||
|
protected int | string | array $columnSpan = 'full';
|
||||||
|
|
||||||
|
public function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->query(OrderResource::getEloquentQuery()->latest()->limit(10))
|
||||||
|
->defaultPaginationPageOption(5)
|
||||||
|
->defaultSort('created_at', 'desc')
|
||||||
|
->columns([
|
||||||
|
Tables\Columns\TextColumn::make('order_number')
|
||||||
|
->label('Order #')
|
||||||
|
->searchable()
|
||||||
|
->sortable()
|
||||||
|
->url(fn (Order $record): string => OrderResource::getUrl('view', ['record' => $record]))
|
||||||
|
->color('primary'),
|
||||||
|
Tables\Columns\TextColumn::make('customer_name')
|
||||||
|
->searchable()
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('total')
|
||||||
|
->money('ZAR')
|
||||||
|
->sortable(),
|
||||||
|
Tables\Columns\TextColumn::make('status')
|
||||||
|
->badge()
|
||||||
|
->color(fn (string $state): string => match ($state) {
|
||||||
|
'pending' => 'warning',
|
||||||
|
'processing' => 'info',
|
||||||
|
'completed' => 'success',
|
||||||
|
'cancelled' => 'danger',
|
||||||
|
}),
|
||||||
|
Tables\Columns\TextColumn::make('payment_status')
|
||||||
|
->badge()
|
||||||
|
->color(fn (string $state): string => match ($state) {
|
||||||
|
'pending' => 'warning',
|
||||||
|
'paid' => 'success',
|
||||||
|
'failed' => 'danger',
|
||||||
|
}),
|
||||||
|
Tables\Columns\TextColumn::make('created_at')
|
||||||
|
->dateTime()
|
||||||
|
->sortable()
|
||||||
|
->since(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getTableHeading(): string
|
||||||
|
{
|
||||||
|
return 'Latest Orders';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Widgets;
|
||||||
|
|
||||||
|
use App\Models\Order;
|
||||||
|
use Filament\Widgets\ChartWidget;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class RevenueChart extends ChartWidget
|
||||||
|
{
|
||||||
|
protected ?string $heading = 'Revenue (Last 7 Days)';
|
||||||
|
|
||||||
|
protected static ?int $sort = 3;
|
||||||
|
|
||||||
|
protected function getData(): array
|
||||||
|
{
|
||||||
|
$data = Order::where('payment_status', 'paid')
|
||||||
|
->where('created_at', '>=', now()->subDays(7))
|
||||||
|
->select(
|
||||||
|
DB::raw('DATE(created_at) as date'),
|
||||||
|
DB::raw('SUM(total) as revenue')
|
||||||
|
)
|
||||||
|
->groupBy('date')
|
||||||
|
->orderBy('date')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$labels = [];
|
||||||
|
$revenues = [];
|
||||||
|
|
||||||
|
// Fill in last 7 days
|
||||||
|
for ($i = 6; $i >= 0; $i--) {
|
||||||
|
$date = now()->subDays($i)->format('Y-m-d');
|
||||||
|
$dayName = now()->subDays($i)->format('D');
|
||||||
|
$labels[] = $dayName;
|
||||||
|
|
||||||
|
$dayData = $data->firstWhere('date', $date);
|
||||||
|
$revenues[] = $dayData ? $dayData->revenue : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'datasets' => [
|
||||||
|
[
|
||||||
|
'label' => 'Revenue (R)',
|
||||||
|
'data' => $revenues,
|
||||||
|
'backgroundColor' => 'rgba(59, 130, 246, 0.1)',
|
||||||
|
'borderColor' => 'rgb(59, 130, 246)',
|
||||||
|
'fill' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'labels' => $labels,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getType(): string
|
||||||
|
{
|
||||||
|
return 'line';
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getOptions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'scales' => [
|
||||||
|
'y' => [
|
||||||
|
'beginAtZero' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Widgets;
|
||||||
|
|
||||||
|
use App\Models\Order;
|
||||||
|
use App\Models\Product;
|
||||||
|
use Filament\Widgets\StatsOverviewWidget;
|
||||||
|
use Filament\Widgets\StatsOverviewWidget\Stat;
|
||||||
|
|
||||||
|
class StatsOverview extends StatsOverviewWidget
|
||||||
|
{
|
||||||
|
protected static ?int $sort = 1;
|
||||||
|
|
||||||
|
protected function getStats(): array
|
||||||
|
{
|
||||||
|
$totalOrders = Order::count();
|
||||||
|
$pendingOrders = Order::where('status', 'pending')->count();
|
||||||
|
$processingOrders = Order::where('status', 'processing')->count();
|
||||||
|
$lowStockProducts = Product::where('stock', '<', 10)->count();
|
||||||
|
|
||||||
|
$totalRevenue = Order::where('payment_status', 'paid')->sum('total');
|
||||||
|
$monthlyRevenue = Order::where('payment_status', 'paid')
|
||||||
|
->whereMonth('created_at', now()->month)
|
||||||
|
->whereYear('created_at', now()->year)
|
||||||
|
->sum('total');
|
||||||
|
|
||||||
|
$todayOrders = Order::whereDate('created_at', today())->count();
|
||||||
|
$todayRevenue = Order::where('payment_status', 'paid')
|
||||||
|
->whereDate('created_at', today())
|
||||||
|
->sum('total');
|
||||||
|
|
||||||
|
return [
|
||||||
|
Stat::make('Pending Orders', $pendingOrders)
|
||||||
|
->description('Awaiting processing')
|
||||||
|
->descriptionIcon('heroicon-m-clock')
|
||||||
|
->color('warning')
|
||||||
|
->chart([7, 5, 10, 5, $pendingOrders]),
|
||||||
|
|
||||||
|
Stat::make('Processing Orders', $processingOrders)
|
||||||
|
->description('Currently being processed')
|
||||||
|
->descriptionIcon('heroicon-m-arrow-path')
|
||||||
|
->color('info'),
|
||||||
|
|
||||||
|
Stat::make('Low Stock Alert', $lowStockProducts)
|
||||||
|
->description('Products with less than 10 units')
|
||||||
|
->descriptionIcon('heroicon-m-exclamation-triangle')
|
||||||
|
->color($lowStockProducts > 0 ? 'danger' : 'success'),
|
||||||
|
|
||||||
|
Stat::make('Today\'s Orders', $todayOrders)
|
||||||
|
->description('Orders placed today')
|
||||||
|
->descriptionIcon('heroicon-m-shopping-bag')
|
||||||
|
->color('success'),
|
||||||
|
|
||||||
|
Stat::make('Today\'s Revenue', 'R' . number_format($todayRevenue, 2))
|
||||||
|
->description(now()->format('l, F j'))
|
||||||
|
->descriptionIcon('heroicon-m-banknotes')
|
||||||
|
->color('success'),
|
||||||
|
|
||||||
|
Stat::make('Monthly Revenue', 'R' . number_format($monthlyRevenue, 2))
|
||||||
|
->description(now()->format('F Y'))
|
||||||
|
->descriptionIcon('heroicon-m-chart-bar')
|
||||||
|
->color('info'),
|
||||||
|
|
||||||
|
Stat::make('Total Revenue', 'R' . number_format($totalRevenue, 2))
|
||||||
|
->description('All time revenue')
|
||||||
|
->descriptionIcon('heroicon-m-currency-dollar')
|
||||||
|
->color('success'),
|
||||||
|
|
||||||
|
Stat::make('Total Orders', $totalOrders)
|
||||||
|
->description('All time orders')
|
||||||
|
->descriptionIcon('heroicon-m-shopping-cart')
|
||||||
|
->color('primary'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Product;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class CartController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$cart = session()->get('cart', []);
|
||||||
|
$total = 0;
|
||||||
|
$items = [];
|
||||||
|
|
||||||
|
foreach ($cart as $itemKey => $cartItem) {
|
||||||
|
// Handle both old and new cart formats
|
||||||
|
if (is_array($cartItem)) {
|
||||||
|
$productId = $cartItem['product_id'] ?? null;
|
||||||
|
$type = $cartItem['type'] ?? 'wallpaper';
|
||||||
|
$printStockId = $cartItem['print_stock_id'] ?? null;
|
||||||
|
} else {
|
||||||
|
// Old format: just the product ID
|
||||||
|
$productId = $itemKey;
|
||||||
|
$type = 'wallpaper';
|
||||||
|
$printStockId = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($productId) {
|
||||||
|
$product = Product::find($productId);
|
||||||
|
if ($product) {
|
||||||
|
$quantity = is_array($cartItem) ? ($cartItem['quantity'] ?? 1) : $cartItem;
|
||||||
|
$stockCost = 0;
|
||||||
|
$stock = null;
|
||||||
|
|
||||||
|
// Get print stock if available
|
||||||
|
if ($printStockId) {
|
||||||
|
$stock = $product->printStocks()->find($printStockId);
|
||||||
|
if ($stock) {
|
||||||
|
$stockCost = ($type === 'wallpaper') ? $stock->cost_per_meter : $stock->cost_per_m2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate price based on stock cost only (no base design cost)
|
||||||
|
$basePrice = $stockCost;
|
||||||
|
|
||||||
|
if ($type === 'wallpaper') {
|
||||||
|
$length = is_array($cartItem) ? ($cartItem['length'] ?? 0) : 0;
|
||||||
|
$itemTotal = $basePrice * $length * $quantity;
|
||||||
|
} elseif ($type === 'mural') {
|
||||||
|
$width = is_array($cartItem) ? ($cartItem['width'] ?? 0) : 0;
|
||||||
|
$height = is_array($cartItem) ? ($cartItem['height'] ?? 0) : 0;
|
||||||
|
$m2 = $width * $height;
|
||||||
|
$itemTotal = $basePrice * $m2 * $quantity;
|
||||||
|
} else {
|
||||||
|
$itemTotal = $basePrice * $quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
$total += $itemTotal;
|
||||||
|
$items[] = [
|
||||||
|
'key' => $itemKey,
|
||||||
|
'product' => $product,
|
||||||
|
'stock' => $stock,
|
||||||
|
'quantity' => $quantity,
|
||||||
|
'type' => $type,
|
||||||
|
'length' => is_array($cartItem) ? ($cartItem['length'] ?? null) : null,
|
||||||
|
'width' => is_array($cartItem) ? ($cartItem['width'] ?? null) : null,
|
||||||
|
'height' => is_array($cartItem) ? ($cartItem['height'] ?? null) : null,
|
||||||
|
'subtotal' => $itemTotal
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('cart', [
|
||||||
|
'items' => $items,
|
||||||
|
'total' => $total,
|
||||||
|
'itemCount' => count($cart)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function add(Request $request, Product $product)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'print_stock_id' => 'required|exists:print_stocks,id',
|
||||||
|
'length' => $product->type === 'wallpaper' ? 'required|numeric|min:0.5' : 'nullable',
|
||||||
|
'width' => $product->type === 'mural' ? 'required|numeric|min:0.5' : 'nullable',
|
||||||
|
'height' => $product->type === 'mural' ? 'required|numeric|min:0.5' : 'nullable',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$cart = session()->get('cart', []);
|
||||||
|
$cartItemKey = $product->id . '_' . $request->input('print_stock_id') . '_' . uniqid();
|
||||||
|
|
||||||
|
// Create a unique cart item with dimensions and stock
|
||||||
|
$cartItem = [
|
||||||
|
'product_id' => $product->id,
|
||||||
|
'print_stock_id' => $request->input('print_stock_id'),
|
||||||
|
'quantity' => 1,
|
||||||
|
'type' => $product->type,
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($product->type === 'wallpaper') {
|
||||||
|
$cartItem['length'] = $request->input('length');
|
||||||
|
} elseif ($product->type === 'mural') {
|
||||||
|
$cartItem['width'] = $request->input('width');
|
||||||
|
$cartItem['height'] = $request->input('height');
|
||||||
|
}
|
||||||
|
|
||||||
|
$cart[$cartItemKey] = $cartItem;
|
||||||
|
session()->put('cart', $cart);
|
||||||
|
|
||||||
|
return redirect()->back()->with('success', $product->name . ' added to cart!');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'item_key' => 'required',
|
||||||
|
'quantity' => 'required|integer|min:1'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$cart = session()->get('cart', []);
|
||||||
|
$itemKey = $request->input('item_key');
|
||||||
|
$quantity = $request->input('quantity');
|
||||||
|
|
||||||
|
if (isset($cart[$itemKey])) {
|
||||||
|
$cart[$itemKey]['quantity'] = $quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
session()->put('cart', $cart);
|
||||||
|
|
||||||
|
return redirect()->back()->with('success', 'Cart updated!');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function remove(Request $request)
|
||||||
|
{
|
||||||
|
$itemKey = $request->input('item_key');
|
||||||
|
$cart = session()->get('cart', []);
|
||||||
|
|
||||||
|
if (isset($cart[$itemKey])) {
|
||||||
|
unset($cart[$itemKey]);
|
||||||
|
}
|
||||||
|
|
||||||
|
session()->put('cart', $cart);
|
||||||
|
|
||||||
|
return redirect()->back()->with('success', 'Product removed from cart!');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function clear()
|
||||||
|
{
|
||||||
|
session()->forget('cart');
|
||||||
|
return redirect()->back()->with('success', 'Cart cleared!');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
abstract class Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\Product;
|
||||||
|
|
||||||
|
class FabricsController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$fabrics = Product::take(6)->get();
|
||||||
|
|
||||||
|
return view('fabrics', [
|
||||||
|
'fabrics' => $fabrics
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\Product;
|
||||||
|
use App\Models\Category;
|
||||||
|
use App\Models\HeroImage;
|
||||||
|
|
||||||
|
class HomeController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$categories = Category::all();
|
||||||
|
$featuredWallpapers = Product::where('type', 'wallpaper')->where('featured', true)->take(3)->get();
|
||||||
|
$featuredMurals = Product::where('type', 'mural')->where('featured', true)->take(3)->get();
|
||||||
|
$heroImages = HeroImage::where('page', 'home')->where('is_active', true)->orderBy('sort_order')->get();
|
||||||
|
|
||||||
|
return view('home', [
|
||||||
|
'categories' => $categories,
|
||||||
|
'featuredWallpapers' => $featuredWallpapers,
|
||||||
|
'featuredMurals' => $featuredMurals,
|
||||||
|
'heroImages' => $heroImages
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\Product;
|
||||||
|
use App\Models\Category;
|
||||||
|
use App\Models\HeroImage;
|
||||||
|
|
||||||
|
class MuralsController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$products = Product::where('type', 'mural')->get();
|
||||||
|
$categories = Category::all();
|
||||||
|
$heroImages = HeroImage::where('page', 'mural')->where('is_active', true)->orderBy('sort_order')->get();
|
||||||
|
|
||||||
|
return view('murals', [
|
||||||
|
'products' => $products,
|
||||||
|
'categories' => $categories,
|
||||||
|
'heroImages' => $heroImages
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,373 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Order;
|
||||||
|
use App\Models\OrderItem;
|
||||||
|
use App\Models\Product;
|
||||||
|
use App\Models\PrintStock;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class OrderController extends Controller
|
||||||
|
{
|
||||||
|
public function checkout()
|
||||||
|
{
|
||||||
|
$cart = session()->get('cart', []);
|
||||||
|
|
||||||
|
if (empty($cart)) {
|
||||||
|
return redirect()->route('cart')->with('error', 'Your cart is empty!');
|
||||||
|
}
|
||||||
|
|
||||||
|
$items = [];
|
||||||
|
$total = 0;
|
||||||
|
|
||||||
|
foreach ($cart as $itemKey => $cartItem) {
|
||||||
|
// Handle both old and new cart formats
|
||||||
|
if (is_array($cartItem)) {
|
||||||
|
$productId = $cartItem['product_id'] ?? null;
|
||||||
|
$type = $cartItem['type'] ?? 'wallpaper';
|
||||||
|
$printStockId = $cartItem['print_stock_id'] ?? null;
|
||||||
|
} else {
|
||||||
|
$productId = $itemKey;
|
||||||
|
$type = 'wallpaper';
|
||||||
|
$printStockId = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($productId) {
|
||||||
|
$product = Product::find($productId);
|
||||||
|
if ($product) {
|
||||||
|
$quantity = is_array($cartItem) ? ($cartItem['quantity'] ?? 1) : $cartItem;
|
||||||
|
$stockCost = 0;
|
||||||
|
$stock = null;
|
||||||
|
|
||||||
|
// Get print stock if available
|
||||||
|
if ($printStockId) {
|
||||||
|
$stock = $product->printStocks()->find($printStockId);
|
||||||
|
if ($stock) {
|
||||||
|
$stockCost = ($type === 'wallpaper') ? $stock->cost_per_meter : $stock->cost_per_m2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate price based on stock cost only (no base design cost)
|
||||||
|
$basePrice = $stockCost;
|
||||||
|
|
||||||
|
if ($type === 'wallpaper') {
|
||||||
|
$length = is_array($cartItem) ? ($cartItem['length'] ?? 0) : 0;
|
||||||
|
$subtotal = $basePrice * $length * $quantity;
|
||||||
|
} elseif ($type === 'mural') {
|
||||||
|
$width = is_array($cartItem) ? ($cartItem['width'] ?? 0) : 0;
|
||||||
|
$height = is_array($cartItem) ? ($cartItem['height'] ?? 0) : 0;
|
||||||
|
$m2 = $width * $height;
|
||||||
|
$subtotal = $basePrice * $m2 * $quantity;
|
||||||
|
} else {
|
||||||
|
$subtotal = $basePrice * $quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
$total += $subtotal;
|
||||||
|
$items[] = [
|
||||||
|
'key' => $itemKey,
|
||||||
|
'product' => $product,
|
||||||
|
'stock' => $stock,
|
||||||
|
'quantity' => $quantity,
|
||||||
|
'type' => $type,
|
||||||
|
'length' => is_array($cartItem) ? ($cartItem['length'] ?? null) : null,
|
||||||
|
'width' => is_array($cartItem) ? ($cartItem['width'] ?? null) : null,
|
||||||
|
'height' => is_array($cartItem) ? ($cartItem['height'] ?? null) : null,
|
||||||
|
'subtotal' => $subtotal
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('checkout', [
|
||||||
|
'items' => $items,
|
||||||
|
'total' => $total,
|
||||||
|
'itemCount' => count($cart)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function process(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'customer_name' => 'required|string|max:255',
|
||||||
|
'customer_email' => 'required|email',
|
||||||
|
'customer_phone' => 'required|string|max:20',
|
||||||
|
'shipping_address' => 'required|string|max:500',
|
||||||
|
'notes' => 'nullable|string|max:500'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$cart = session()->get('cart', []);
|
||||||
|
|
||||||
|
if (empty($cart)) {
|
||||||
|
return redirect()->route('cart')->with('error', 'Your cart is empty!');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate total and validate stock
|
||||||
|
$total = 0;
|
||||||
|
$orderItems = [];
|
||||||
|
|
||||||
|
foreach ($cart as $itemKey => $cartItem) {
|
||||||
|
// Handle both old and new cart formats
|
||||||
|
if (is_array($cartItem)) {
|
||||||
|
$productId = $cartItem['product_id'] ?? null;
|
||||||
|
$quantity = $cartItem['quantity'] ?? 1;
|
||||||
|
$type = $cartItem['type'] ?? 'wallpaper';
|
||||||
|
$printStockId = $cartItem['print_stock_id'] ?? null;
|
||||||
|
} else {
|
||||||
|
$productId = $itemKey;
|
||||||
|
$quantity = $cartItem;
|
||||||
|
$type = 'wallpaper';
|
||||||
|
$printStockId = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$product = Product::find($productId);
|
||||||
|
if (!$product) {
|
||||||
|
return redirect()->route('cart')->with('error', 'Product not found!');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($product->stock < $quantity) {
|
||||||
|
return redirect()->route('cart')->with('error', "Insufficient stock for {$product->name}");
|
||||||
|
}
|
||||||
|
|
||||||
|
$stockCost = 0;
|
||||||
|
$stock = null;
|
||||||
|
|
||||||
|
// Get print stock if available
|
||||||
|
if ($printStockId) {
|
||||||
|
$stock = $product->printStocks()->find($printStockId);
|
||||||
|
if ($stock) {
|
||||||
|
$stockCost = ($type === 'wallpaper') ? $stock->cost_per_meter : $stock->cost_per_m2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate price based on stock cost only (no base design cost)
|
||||||
|
$basePrice = $stockCost;
|
||||||
|
|
||||||
|
if ($type === 'wallpaper') {
|
||||||
|
$length = is_array($cartItem) ? ($cartItem['length'] ?? 0) : 0;
|
||||||
|
$subtotal = $basePrice * $length * $quantity;
|
||||||
|
} elseif ($type === 'mural') {
|
||||||
|
$width = is_array($cartItem) ? ($cartItem['width'] ?? 0) : 0;
|
||||||
|
$height = is_array($cartItem) ? ($cartItem['height'] ?? 0) : 0;
|
||||||
|
$m2 = $width * $height;
|
||||||
|
$subtotal = $basePrice * $m2 * $quantity;
|
||||||
|
} else {
|
||||||
|
$subtotal = $basePrice * $quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
$total += $subtotal;
|
||||||
|
$orderItems[$itemKey] = [
|
||||||
|
'product_id' => $productId,
|
||||||
|
'quantity' => $quantity,
|
||||||
|
'price' => $product->price,
|
||||||
|
'stock_cost' => $stockCost,
|
||||||
|
'print_stock_id' => $printStockId,
|
||||||
|
'type' => $type,
|
||||||
|
'length' => is_array($cartItem) ? ($cartItem['length'] ?? null) : null,
|
||||||
|
'width' => is_array($cartItem) ? ($cartItem['width'] ?? null) : null,
|
||||||
|
'height' => is_array($cartItem) ? ($cartItem['height'] ?? null) : null,
|
||||||
|
'subtotal' => $subtotal
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create order
|
||||||
|
$orderNumber = 'ORD-' . date('Ymd') . '-' . strtoupper(uniqid());
|
||||||
|
|
||||||
|
$orderData = [
|
||||||
|
'user_id' => auth()->check() ? auth()->id() : null,
|
||||||
|
'order_number' => $orderNumber,
|
||||||
|
'total' => $total,
|
||||||
|
'status' => 'pending',
|
||||||
|
'payment_method' => 'yoco',
|
||||||
|
'payment_status' => 'pending',
|
||||||
|
'customer_name' => $request->input('customer_name'),
|
||||||
|
'customer_email' => $request->input('customer_email'),
|
||||||
|
'customer_phone' => $request->input('customer_phone'),
|
||||||
|
'shipping_address' => $request->input('shipping_address'),
|
||||||
|
];
|
||||||
|
|
||||||
|
if ($request->filled('notes')) {
|
||||||
|
$orderData['notes'] = $request->input('notes');
|
||||||
|
}
|
||||||
|
|
||||||
|
$order = Order::create($orderData);
|
||||||
|
|
||||||
|
// Create order items
|
||||||
|
foreach ($orderItems as $itemKey => $data) {
|
||||||
|
$product = Product::find($data['product_id']);
|
||||||
|
|
||||||
|
OrderItem::create([
|
||||||
|
'order_id' => $order->uuid,
|
||||||
|
'product_id' => $data['product_id'],
|
||||||
|
'quantity' => $data['quantity'],
|
||||||
|
'price' => $data['price'],
|
||||||
|
'print_stock_id' => $data['print_stock_id'],
|
||||||
|
'type' => $data['type'],
|
||||||
|
'length' => $data['length'],
|
||||||
|
'width' => $data['width'],
|
||||||
|
'height' => $data['height']
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store order UUID in session for payment
|
||||||
|
session(['pending_order_uuid' => $order->uuid]);
|
||||||
|
|
||||||
|
// Redirect to Yoco payment
|
||||||
|
return redirect()->route('yoco-payment', ['order' => $order->uuid]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function success(Order $order)
|
||||||
|
{
|
||||||
|
// Authorization: only allow viewing own orders or admin
|
||||||
|
if (auth()->check() && auth()->user()->id !== $order->user_id && !auth()->user()->is_admin) {
|
||||||
|
abort(403, 'Unauthorized access to this order.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// For guest orders, verify via session
|
||||||
|
if (!auth()->check() && session('pending_order_uuid') !== $order->uuid) {
|
||||||
|
abort(403, 'Unauthorized access to this order.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('order-success', ['order' => $order]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function history()
|
||||||
|
{
|
||||||
|
$orders = Order::orderBy('created_at', 'desc')->get();
|
||||||
|
|
||||||
|
return view('order-history', ['orders' => $orders]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function yocoPayment(Order $order)
|
||||||
|
{
|
||||||
|
// Verify this is a pending payment
|
||||||
|
if ($order->payment_status !== 'pending') {
|
||||||
|
abort(400, 'This order has already been paid.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create Yoco checkout
|
||||||
|
$secretKey = config('services.yoco.secret_key');
|
||||||
|
$mode = config('services.yoco.mode');
|
||||||
|
|
||||||
|
// Check if API key is configured
|
||||||
|
if (empty($secretKey) || $secretKey === 'sk_test_your_key_here') {
|
||||||
|
return redirect()->route('checkout')->with('error', 'Payment gateway not configured. Please contact support.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$baseUrl = $mode === 'live'
|
||||||
|
? 'https://payments.yoco.com/api/checkouts'
|
||||||
|
: 'https://payments.yoco.com/api/checkouts';
|
||||||
|
|
||||||
|
$checkoutData = [
|
||||||
|
'amount' => (int)($order->total * 100), // Amount in cents
|
||||||
|
'currency' => 'ZAR',
|
||||||
|
'successUrl' => route('yoco-success', ['order' => $order->uuid]),
|
||||||
|
'cancelUrl' => route('yoco-cancel', ['order' => $order->uuid]),
|
||||||
|
'failureUrl' => route('yoco-failure', ['order' => $order->uuid]),
|
||||||
|
'metadata' => [
|
||||||
|
'order_uuid' => $order->uuid,
|
||||||
|
'order_number' => $order->order_number,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
try {
|
||||||
|
$response = \Illuminate\Support\Facades\Http::withHeaders([
|
||||||
|
'Authorization' => 'Bearer ' . $secretKey,
|
||||||
|
'Content-Type' => 'application/json',
|
||||||
|
])->post($baseUrl, $checkoutData);
|
||||||
|
|
||||||
|
if ($response->successful()) {
|
||||||
|
$checkout = $response->json();
|
||||||
|
return redirect($checkout['redirectUrl']);
|
||||||
|
} else {
|
||||||
|
\Log::error('Yoco API Error', [
|
||||||
|
'status' => $response->status(),
|
||||||
|
'body' => $response->body()
|
||||||
|
]);
|
||||||
|
return redirect()->route('checkout')->with('error', 'Unable to initialize payment: ' . $response->body());
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Log::error('Yoco Payment Exception', ['message' => $e->getMessage()]);
|
||||||
|
return redirect()->route('checkout')->with('error', 'Payment error: ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function yocoSuccess(Order $order)
|
||||||
|
{
|
||||||
|
// Verify order is pending payment
|
||||||
|
if ($order->payment_status === 'paid') {
|
||||||
|
return redirect()->route('order-success', ['order' => $order])
|
||||||
|
->with('success', 'Payment was already processed for this order.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update order status
|
||||||
|
$order->update([
|
||||||
|
'payment_status' => 'paid',
|
||||||
|
'status' => 'processing',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Reduce stock
|
||||||
|
foreach ($order->items as $item) {
|
||||||
|
$product = $item->product;
|
||||||
|
$product->stock -= $item->quantity;
|
||||||
|
$product->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear pending order from session
|
||||||
|
session()->forget('pending_order_uuid');
|
||||||
|
session()->forget('cart');
|
||||||
|
|
||||||
|
return redirect()->route('order-success', ['order' => $order])
|
||||||
|
->with('success', 'Payment successful! Your order has been confirmed.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function yocoCancel(Order $order)
|
||||||
|
{
|
||||||
|
return redirect()->route('checkout')
|
||||||
|
->with('error', 'Payment was cancelled. Your order is still pending.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function yocoFailure(Order $order)
|
||||||
|
{
|
||||||
|
$order->update([
|
||||||
|
'payment_status' => 'failed',
|
||||||
|
]);
|
||||||
|
|
||||||
|
return redirect()->route('checkout')
|
||||||
|
->with('error', 'Payment failed. Please try again or use a different payment method.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function yocoWebhook(Request $request)
|
||||||
|
{
|
||||||
|
// Verify webhook signature
|
||||||
|
$payload = $request->getContent();
|
||||||
|
$signature = $request->header('X-Yoco-Signature');
|
||||||
|
|
||||||
|
// Process webhook event
|
||||||
|
$event = $request->all();
|
||||||
|
|
||||||
|
if (isset($event['type']) && $event['type'] === 'checkout.succeeded') {
|
||||||
|
$metadata = $event['payload']['metadata'] ?? [];
|
||||||
|
$orderId = $metadata['order_id'] ?? null;
|
||||||
|
|
||||||
|
if ($orderId) {
|
||||||
|
$order = Order::find($orderId);
|
||||||
|
if ($order && $order->payment_status !== 'paid') {
|
||||||
|
$order->update([
|
||||||
|
'payment_status' => 'paid',
|
||||||
|
'status' => 'processing',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Reduce stock
|
||||||
|
foreach ($order->items as $item) {
|
||||||
|
$product = $item->product;
|
||||||
|
$product->stock -= $item->quantity;
|
||||||
|
$product->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['status' => 'success']);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Product;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ProductController extends Controller
|
||||||
|
{
|
||||||
|
public function show(Product $product)
|
||||||
|
{
|
||||||
|
return view('product-detail', ['product' => $product]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\Product;
|
||||||
|
use App\Models\Category;
|
||||||
|
use App\Models\HeroImage;
|
||||||
|
|
||||||
|
class WallpapersController extends Controller
|
||||||
|
{
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$products = Product::where('type', 'wallpaper')->get();
|
||||||
|
$categories = Category::all();
|
||||||
|
$heroImages = HeroImage::where('page', 'wallpaper')->where('is_active', true)->orderBy('sort_order')->get();
|
||||||
|
|
||||||
|
return view('wallpapers', [
|
||||||
|
'products' => $products,
|
||||||
|
'categories' => $categories,
|
||||||
|
'heroImages' => $heroImages
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
class Category extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'slug',
|
||||||
|
'description',
|
||||||
|
'image'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected static function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
|
||||||
|
static::creating(function ($category) {
|
||||||
|
if (empty($category->slug)) {
|
||||||
|
$category->slug = Str::slug($category->name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
static::updating(function ($category) {
|
||||||
|
if ($category->isDirty('name') && !$category->isDirty('slug')) {
|
||||||
|
$category->slug = Str::slug($category->name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function products()
|
||||||
|
{
|
||||||
|
return $this->hasMany(Product::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class HeroImage extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'page',
|
||||||
|
'image_path',
|
||||||
|
'title',
|
||||||
|
'description',
|
||||||
|
'button_text',
|
||||||
|
'button_link',
|
||||||
|
'sort_order',
|
||||||
|
'is_active',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'is_active' => 'boolean',
|
||||||
|
'sort_order' => 'integer',
|
||||||
|
];
|
||||||
|
|
||||||
|
public static function getPages()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'home' => 'Home Page',
|
||||||
|
'wallpaper' => 'Wallpaper Product Page',
|
||||||
|
'mural' => 'Mural Product Page',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||||
|
|
||||||
|
class Order extends Model
|
||||||
|
{
|
||||||
|
use HasUuids;
|
||||||
|
|
||||||
|
protected $primaryKey = 'uuid';
|
||||||
|
protected $keyType = 'string';
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'user_id',
|
||||||
|
'order_number',
|
||||||
|
'total',
|
||||||
|
'status',
|
||||||
|
'payment_method',
|
||||||
|
'payment_status',
|
||||||
|
'customer_name',
|
||||||
|
'customer_email',
|
||||||
|
'customer_phone',
|
||||||
|
'shipping_address',
|
||||||
|
'notes'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(User::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function items()
|
||||||
|
{
|
||||||
|
return $this->hasMany(OrderItem::class, 'order_id', 'uuid');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class OrderItem extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'order_id',
|
||||||
|
'product_id',
|
||||||
|
'print_stock_id',
|
||||||
|
'quantity',
|
||||||
|
'price',
|
||||||
|
'type',
|
||||||
|
'length',
|
||||||
|
'width',
|
||||||
|
'height'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function order()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Order::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function product()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Product::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function printStock()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(PrintStock::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class PrintStock extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'cost_per_meter',
|
||||||
|
'cost_per_m2',
|
||||||
|
'type',
|
||||||
|
'width'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function products()
|
||||||
|
{
|
||||||
|
return $this->belongsToMany(Product::class, 'product_print_stocks');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
class Product extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'category_id',
|
||||||
|
'name',
|
||||||
|
'slug',
|
||||||
|
'description',
|
||||||
|
'price',
|
||||||
|
'image',
|
||||||
|
'stock',
|
||||||
|
'featured',
|
||||||
|
'type'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected static function boot()
|
||||||
|
{
|
||||||
|
parent::boot();
|
||||||
|
|
||||||
|
static::creating(function ($model) {
|
||||||
|
if (empty($model->slug)) {
|
||||||
|
$model->slug = Str::slug($model->name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
static::updating(function ($model) {
|
||||||
|
if (empty($model->slug)) {
|
||||||
|
$model->slug = Str::slug($model->name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function category()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Category::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function orderItems()
|
||||||
|
{
|
||||||
|
return $this->hasMany(OrderItem::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function printStocks()
|
||||||
|
{
|
||||||
|
return $this->belongsToMany(PrintStock::class, 'product_print_stocks');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function images()
|
||||||
|
{
|
||||||
|
return $this->hasMany(ProductImage::class)->orderBy('sort_order');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRouteKeyName()
|
||||||
|
{
|
||||||
|
return 'slug';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ProductImage extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'product_id',
|
||||||
|
'image_path',
|
||||||
|
'sort_order',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function product()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Product::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
|
||||||
|
class User extends Authenticatable
|
||||||
|
{
|
||||||
|
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||||
|
use HasFactory, Notifiable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'email',
|
||||||
|
'password',
|
||||||
|
'is_admin',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that should be hidden for serialization.
|
||||||
|
*
|
||||||
|
* @var list<string>
|
||||||
|
*/
|
||||||
|
protected $hidden = [
|
||||||
|
'password',
|
||||||
|
'remember_token',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the attributes that should be cast.
|
||||||
|
*
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
|
protected function casts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'email_verified_at' => 'datetime',
|
||||||
|
'password' => 'hashed',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
|
use Illuminate\Support\Facades\View;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Register any application services.
|
||||||
|
*/
|
||||||
|
public function register(): void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap any application services.
|
||||||
|
*/
|
||||||
|
public function boot(): void
|
||||||
|
{
|
||||||
|
if (config('app.env') === 'production' || request()->server('HTTP_X_FORWARDED_PROTO') === 'https') {
|
||||||
|
URL::forceScheme('https');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Share cart count with all views
|
||||||
|
View::composer('*', function ($view) {
|
||||||
|
$cartCount = session('cart') ? count(session('cart')) : 0;
|
||||||
|
$view->with('cartCount', $cartCount);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Providers\Filament;
|
||||||
|
|
||||||
|
use Filament\Http\Middleware\Authenticate;
|
||||||
|
use Filament\Http\Middleware\DisableBladeIconComponents;
|
||||||
|
use Filament\Http\Middleware\DispatchServingFilamentEvent;
|
||||||
|
use Filament\Pages;
|
||||||
|
use Filament\Panel;
|
||||||
|
use Filament\PanelProvider;
|
||||||
|
use Filament\Support\Colors\Color;
|
||||||
|
use Filament\Widgets;
|
||||||
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||||
|
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||||
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||||
|
use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||||
|
use Illuminate\Session\Middleware\AuthenticateSession;
|
||||||
|
use Illuminate\Session\Middleware\StartSession;
|
||||||
|
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||||
|
|
||||||
|
class AdminPanelProvider extends PanelProvider
|
||||||
|
{
|
||||||
|
public function panel(Panel $panel): Panel
|
||||||
|
{
|
||||||
|
return $panel
|
||||||
|
->default()
|
||||||
|
->id('admin')
|
||||||
|
->path('admin')
|
||||||
|
->login()
|
||||||
|
->colors([
|
||||||
|
'primary' => Color::Amber,
|
||||||
|
])
|
||||||
|
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
|
||||||
|
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
|
||||||
|
->pages([
|
||||||
|
Pages\Dashboard::class,
|
||||||
|
])
|
||||||
|
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
|
||||||
|
->widgets([
|
||||||
|
Widgets\AccountWidget::class,
|
||||||
|
Widgets\FilamentInfoWidget::class,
|
||||||
|
])
|
||||||
|
->middleware([
|
||||||
|
EncryptCookies::class,
|
||||||
|
AddQueuedCookiesToResponse::class,
|
||||||
|
StartSession::class,
|
||||||
|
AuthenticateSession::class,
|
||||||
|
ShareErrorsFromSession::class,
|
||||||
|
VerifyCsrfToken::class,
|
||||||
|
SubstituteBindings::class,
|
||||||
|
DisableBladeIconComponents::class,
|
||||||
|
DispatchServingFilamentEvent::class,
|
||||||
|
])
|
||||||
|
->authMiddleware([
|
||||||
|
Authenticate::class,
|
||||||
|
])
|
||||||
|
->authGuard('web');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Application;
|
||||||
|
use Symfony\Component\Console\Input\ArgvInput;
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
// Register the Composer autoloader...
|
||||||
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
|
// Bootstrap Laravel and handle the command...
|
||||||
|
/** @var Application $app */
|
||||||
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
|
$status = $app->handleCommand(new ArgvInput);
|
||||||
|
|
||||||
|
exit($status);
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Application;
|
||||||
|
use Illuminate\Foundation\Configuration\Exceptions;
|
||||||
|
use Illuminate\Foundation\Configuration\Middleware;
|
||||||
|
|
||||||
|
return Application::configure(basePath: dirname(__DIR__))
|
||||||
|
->withRouting(
|
||||||
|
web: __DIR__.'/../routes/web.php',
|
||||||
|
commands: __DIR__.'/../routes/console.php',
|
||||||
|
health: '/up',
|
||||||
|
)
|
||||||
|
->withMiddleware(function (Middleware $middleware): void {
|
||||||
|
$middleware->trustProxies(at: '*');
|
||||||
|
})
|
||||||
|
->withExceptions(function (Exceptions $exceptions): void {
|
||||||
|
//
|
||||||
|
})->create();
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
App\Providers\Filament\AdminPanelProvider::class,
|
||||||
|
];
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://getcomposer.org/schema.json",
|
||||||
|
"name": "laravel/laravel",
|
||||||
|
"type": "project",
|
||||||
|
"description": "The skeleton application for the Laravel framework.",
|
||||||
|
"keywords": ["laravel", "framework"],
|
||||||
|
"license": "MIT",
|
||||||
|
"require": {
|
||||||
|
"php": "^8.2",
|
||||||
|
"filament/filament": "~4.0",
|
||||||
|
"laravel/framework": "^12.0",
|
||||||
|
"laravel/socialite": "^5.23",
|
||||||
|
"laravel/tinker": "^2.10.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fakerphp/faker": "^1.23",
|
||||||
|
"laravel/pail": "^1.2.2",
|
||||||
|
"laravel/pint": "^1.24",
|
||||||
|
"laravel/sail": "^1.41",
|
||||||
|
"mockery/mockery": "^1.6",
|
||||||
|
"nunomaduro/collision": "^8.6",
|
||||||
|
"phpunit/phpunit": "^11.5.3"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/",
|
||||||
|
"Database\\Factories\\": "database/factories/",
|
||||||
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"setup": [
|
||||||
|
"composer install",
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
|
||||||
|
"@php artisan key:generate",
|
||||||
|
"@php artisan migrate --force",
|
||||||
|
"npm install",
|
||||||
|
"npm run build"
|
||||||
|
],
|
||||||
|
"dev": [
|
||||||
|
"Composer\\Config::disableProcessTimeout",
|
||||||
|
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
|
||||||
|
],
|
||||||
|
"test": [
|
||||||
|
"@php artisan config:clear --ansi",
|
||||||
|
"@php artisan test"
|
||||||
|
],
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover --ansi",
|
||||||
|
"@php artisan filament:upgrade"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
|
||||||
|
],
|
||||||
|
"post-root-package-install": [
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"@php artisan key:generate --ansi",
|
||||||
|
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
||||||
|
"@php artisan migrate --graceful --ansi"
|
||||||
|
],
|
||||||
|
"pre-package-uninstall": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"dont-discover": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"sort-packages": true,
|
||||||
|
"allow-plugins": {
|
||||||
|
"pestphp/pest-plugin": true,
|
||||||
|
"php-http/discovery": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"prefer-stable": true
|
||||||
|
}
|
||||||
Generated
+10936
File diff suppressed because it is too large
Load Diff
+126
@@ -0,0 +1,126 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value is the name of your application, which will be used when the
|
||||||
|
| framework needs to place the application's name in a notification or
|
||||||
|
| other UI elements where an application name needs to be displayed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'name' => env('APP_NAME', 'Laravel'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Environment
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the "environment" your application is currently
|
||||||
|
| running in. This may determine how you prefer to configure various
|
||||||
|
| services the application utilizes. Set this in your ".env" file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Debug Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When your application is in debug mode, detailed error messages with
|
||||||
|
| stack traces will be shown on every error that occurs within your
|
||||||
|
| application. If disabled, a simple generic error page is shown.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'debug' => (bool) env('APP_DEBUG', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This URL is used by the console to properly generate URLs when using
|
||||||
|
| the Artisan command line tool. You should set this to the root of
|
||||||
|
| the application so that it's available within Artisan commands.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default timezone for your application, which
|
||||||
|
| will be used by the PHP date and date-time functions. The timezone
|
||||||
|
| is set to "UTC" by default as it is suitable for most use cases.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Locale Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The application locale determines the default locale that will be used
|
||||||
|
| by Laravel's translation / localization methods. This option can be
|
||||||
|
| set to any locale for which you plan to have translation strings.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => env('APP_LOCALE', 'en'),
|
||||||
|
|
||||||
|
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
||||||
|
|
||||||
|
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This key is utilized by Laravel's encryption services and should be set
|
||||||
|
| to a random, 32 character string to ensure that all encrypted values
|
||||||
|
| are secure. You should do this prior to deploying the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cipher' => 'AES-256-CBC',
|
||||||
|
|
||||||
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
|
'previous_keys' => [
|
||||||
|
...array_filter(
|
||||||
|
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
|
||||||
|
),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Maintenance Mode Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These configuration options determine the driver used to determine and
|
||||||
|
| manage Laravel's "maintenance mode" status. The "cache" driver will
|
||||||
|
| allow maintenance mode to be controlled across multiple machines.
|
||||||
|
|
|
||||||
|
| Supported drivers: "file", "cache"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'maintenance' => [
|
||||||
|
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
|
||||||
|
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
+115
@@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Defaults
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option defines the default authentication "guard" and password
|
||||||
|
| reset "broker" for your application. You may change these values
|
||||||
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'defaults' => [
|
||||||
|
'guard' => env('AUTH_GUARD', 'web'),
|
||||||
|
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Guards
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next, you may define every authentication guard for your application.
|
||||||
|
| Of course, a great default configuration has been defined for you
|
||||||
|
| which utilizes session storage plus the Eloquent user provider.
|
||||||
|
|
|
||||||
|
| All authentication guards have a user provider, which defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
||||||
|
| Supported: "session"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guards' => [
|
||||||
|
'web' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'users',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| User Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All authentication guards have a user provider, which defines how the
|
||||||
|
| users are actually retrieved out of your database or other storage
|
||||||
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
||||||
|
| If you have multiple user tables or models you may configure multiple
|
||||||
|
| providers to represent the model / table. These providers may then
|
||||||
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
||||||
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => [
|
||||||
|
'users' => [
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||||
|
],
|
||||||
|
|
||||||
|
// 'users' => [
|
||||||
|
// 'driver' => 'database',
|
||||||
|
// 'table' => 'users',
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Resetting Passwords
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These configuration options specify the behavior of Laravel's password
|
||||||
|
| reset functionality, including the table utilized for token storage
|
||||||
|
| and the user provider that is invoked to actually retrieve users.
|
||||||
|
|
|
||||||
|
| The expiry time is the number of minutes that each reset token will be
|
||||||
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
||||||
|
| The throttle setting is the number of seconds a user must wait before
|
||||||
|
| generating more password reset tokens. This prevents the user from
|
||||||
|
| quickly generating a very large amount of password reset tokens.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'passwords' => [
|
||||||
|
'users' => [
|
||||||
|
'provider' => 'users',
|
||||||
|
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
|
||||||
|
'expire' => 60,
|
||||||
|
'throttle' => 60,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Confirmation Timeout
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define the number of seconds before a password confirmation
|
||||||
|
| window expires and users are asked to re-enter their password via the
|
||||||
|
| confirmation screen. By default, the timeout lasts for three hours.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache store that will be used by the
|
||||||
|
| framework. This connection is utilized if another isn't explicitly
|
||||||
|
| specified when running a cache operation inside the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('CACHE_STORE', 'database'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Stores
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define all of the cache "stores" for your application as
|
||||||
|
| well as their drivers. You may even define multiple stores for the
|
||||||
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
||||||
|
| Supported drivers: "array", "database", "file", "memcached",
|
||||||
|
| "redis", "dynamodb", "octane",
|
||||||
|
| "failover", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'stores' => [
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'driver' => 'array',
|
||||||
|
'serialize' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'connection' => env('DB_CACHE_CONNECTION'),
|
||||||
|
'table' => env('DB_CACHE_TABLE', 'cache'),
|
||||||
|
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
|
||||||
|
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'file' => [
|
||||||
|
'driver' => 'file',
|
||||||
|
'path' => storage_path('framework/cache/data'),
|
||||||
|
'lock_path' => storage_path('framework/cache/data'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'memcached' => [
|
||||||
|
'driver' => 'memcached',
|
||||||
|
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||||
|
'sasl' => [
|
||||||
|
env('MEMCACHED_USERNAME'),
|
||||||
|
env('MEMCACHED_PASSWORD'),
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||||
|
],
|
||||||
|
'servers' => [
|
||||||
|
[
|
||||||
|
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MEMCACHED_PORT', 11211),
|
||||||
|
'weight' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => env('REDIS_CACHE_CONNECTION', 'cache'),
|
||||||
|
'lock_connection' => env('REDIS_CACHE_LOCK_CONNECTION', 'default'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'dynamodb' => [
|
||||||
|
'driver' => 'dynamodb',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||||
|
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'octane' => [
|
||||||
|
'driver' => 'octane',
|
||||||
|
],
|
||||||
|
|
||||||
|
'failover' => [
|
||||||
|
'driver' => 'failover',
|
||||||
|
'stores' => [
|
||||||
|
'database',
|
||||||
|
'array',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Key Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
|
||||||
|
| stores, there might be other applications using the same cache. For
|
||||||
|
| that reason, you may prefix every cache key to avoid collisions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for database operations. This is
|
||||||
|
| the connection which will be utilized unless another connection
|
||||||
|
| is explicitly specified when you execute a query / statement.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Below are all of the database connections defined for your application.
|
||||||
|
| An example configuration is provided for each database system which
|
||||||
|
| is supported by Laravel. You're free to add / remove connections.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sqlite' => [
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
|
'prefix' => '',
|
||||||
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
|
'busy_timeout' => null,
|
||||||
|
'journal_mode' => null,
|
||||||
|
'synchronous' => null,
|
||||||
|
'transaction_mode' => 'DEFERRED',
|
||||||
|
],
|
||||||
|
|
||||||
|
'mysql' => [
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'mariadb' => [
|
||||||
|
'driver' => 'mariadb',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '3306'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
||||||
|
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'strict' => true,
|
||||||
|
'engine' => null,
|
||||||
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
|
]) : [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'pgsql' => [
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('DB_PORT', '5432'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
'search_path' => 'public',
|
||||||
|
'sslmode' => 'prefer',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqlsrv' => [
|
||||||
|
'driver' => 'sqlsrv',
|
||||||
|
'url' => env('DB_URL'),
|
||||||
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
|
'port' => env('DB_PORT', '1433'),
|
||||||
|
'database' => env('DB_DATABASE', 'laravel'),
|
||||||
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
|
'password' => env('DB_PASSWORD', ''),
|
||||||
|
'charset' => env('DB_CHARSET', 'utf8'),
|
||||||
|
'prefix' => '',
|
||||||
|
'prefix_indexes' => true,
|
||||||
|
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||||
|
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk haven't actually been run on the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => [
|
||||||
|
'table' => 'migrations',
|
||||||
|
'update_date_on_publish' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
|
| provides a richer body of commands than a typical key-value system
|
||||||
|
| such as Memcached. You may define your connection settings here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
|
||||||
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||||
|
'prefix' => env('REDIS_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-database-'),
|
||||||
|
'persistent' => env('REDIS_PERSISTENT', false),
|
||||||
|
],
|
||||||
|
|
||||||
|
'default' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'username' => env('REDIS_USERNAME'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_DB', '0'),
|
||||||
|
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
||||||
|
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
||||||
|
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
||||||
|
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
||||||
|
],
|
||||||
|
|
||||||
|
'cache' => [
|
||||||
|
'url' => env('REDIS_URL'),
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'username' => env('REDIS_USERNAME'),
|
||||||
|
'password' => env('REDIS_PASSWORD'),
|
||||||
|
'port' => env('REDIS_PORT', '6379'),
|
||||||
|
'database' => env('REDIS_CACHE_DB', '1'),
|
||||||
|
'max_retries' => env('REDIS_MAX_RETRIES', 3),
|
||||||
|
'backoff_algorithm' => env('REDIS_BACKOFF_ALGORITHM', 'decorrelated_jitter'),
|
||||||
|
'backoff_base' => env('REDIS_BACKOFF_BASE', 100),
|
||||||
|
'backoff_cap' => env('REDIS_BACKOFF_CAP', 1000),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Filesystem Disk
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default filesystem disk that should be used
|
||||||
|
| by the framework. The "local" disk, as well as a variety of cloud
|
||||||
|
| based disks are available to your application for file storage.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('FILESYSTEM_DISK', 'local'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Filesystem Disks
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Below you may configure as many filesystem disks as necessary, and you
|
||||||
|
| may even configure multiple disks for the same driver. Examples for
|
||||||
|
| most supported storage drivers are configured here for reference.
|
||||||
|
|
|
||||||
|
| Supported drivers: "local", "ftp", "sftp", "s3"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'disks' => [
|
||||||
|
|
||||||
|
'local' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/private'),
|
||||||
|
'serve' => true,
|
||||||
|
'throw' => false,
|
||||||
|
'report' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'public' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/public'),
|
||||||
|
'url' => env('APP_URL').'/storage',
|
||||||
|
'visibility' => 'public',
|
||||||
|
'throw' => false,
|
||||||
|
'report' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
's3' => [
|
||||||
|
'driver' => 's3',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION'),
|
||||||
|
'bucket' => env('AWS_BUCKET'),
|
||||||
|
'url' => env('AWS_URL'),
|
||||||
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||||
|
'throw' => false,
|
||||||
|
'report' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Symbolic Links
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the symbolic links that will be created when the
|
||||||
|
| `storage:link` Artisan command is executed. The array keys should be
|
||||||
|
| the locations of the links and the values should be their targets.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'links' => [
|
||||||
|
public_path('storage') => storage_path('app/public'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Monolog\Handler\NullHandler;
|
||||||
|
use Monolog\Handler\StreamHandler;
|
||||||
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
use Monolog\Processor\PsrLogMessageProcessor;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option defines the default log channel that is utilized to write
|
||||||
|
| messages to your logs. The value provided here should match one of
|
||||||
|
| the channels present in the list of "channels" configured below.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('LOG_CHANNEL', 'stack'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Deprecations Log Channel
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the log channel that should be used to log warnings
|
||||||
|
| regarding deprecated PHP and library features. This allows you to get
|
||||||
|
| your application ready for upcoming major versions of dependencies.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'deprecations' => [
|
||||||
|
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||||
|
'trace' => env('LOG_DEPRECATIONS_TRACE', false),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Channels
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the log channels for your application. Laravel
|
||||||
|
| utilizes the Monolog PHP logging library, which includes a variety
|
||||||
|
| of powerful log handlers and formatters that you're free to use.
|
||||||
|
|
|
||||||
|
| Available drivers: "single", "daily", "slack", "syslog",
|
||||||
|
| "errorlog", "monolog", "custom", "stack"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'channels' => [
|
||||||
|
|
||||||
|
'stack' => [
|
||||||
|
'driver' => 'stack',
|
||||||
|
'channels' => explode(',', (string) env('LOG_STACK', 'single')),
|
||||||
|
'ignore_exceptions' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'single' => [
|
||||||
|
'driver' => 'single',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'daily' => [
|
||||||
|
'driver' => 'daily',
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'days' => env('LOG_DAILY_DAYS', 14),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'driver' => 'slack',
|
||||||
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
||||||
|
'username' => env('LOG_SLACK_USERNAME', 'Laravel Log'),
|
||||||
|
'emoji' => env('LOG_SLACK_EMOJI', ':boom:'),
|
||||||
|
'level' => env('LOG_LEVEL', 'critical'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'papertrail' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||||
|
'handler_with' => [
|
||||||
|
'host' => env('PAPERTRAIL_URL'),
|
||||||
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
|
||||||
|
],
|
||||||
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
|
],
|
||||||
|
|
||||||
|
'stderr' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'handler' => StreamHandler::class,
|
||||||
|
'handler_with' => [
|
||||||
|
'stream' => 'php://stderr',
|
||||||
|
],
|
||||||
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
|
'processors' => [PsrLogMessageProcessor::class],
|
||||||
|
],
|
||||||
|
|
||||||
|
'syslog' => [
|
||||||
|
'driver' => 'syslog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'facility' => env('LOG_SYSLOG_FACILITY', LOG_USER),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'errorlog' => [
|
||||||
|
'driver' => 'errorlog',
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
'null' => [
|
||||||
|
'driver' => 'monolog',
|
||||||
|
'handler' => NullHandler::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'emergency' => [
|
||||||
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
+118
@@ -0,0 +1,118 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Mailer
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default mailer that is used to send all email
|
||||||
|
| messages unless another mailer is explicitly specified when sending
|
||||||
|
| the message. All additional mailers can be configured within the
|
||||||
|
| "mailers" array. Examples of each type of mailer are provided.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('MAIL_MAILER', 'log'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mailer Configurations
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure all of the mailers used by your application plus
|
||||||
|
| their respective settings. Several examples have been configured for
|
||||||
|
| you and you are free to add your own as your application requires.
|
||||||
|
|
|
||||||
|
| Laravel supports a variety of mail "transport" drivers that can be used
|
||||||
|
| when delivering an email. You may specify which one you're using for
|
||||||
|
| your mailers below. You may also add additional mailers if needed.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
|
||||||
|
| "postmark", "resend", "log", "array",
|
||||||
|
| "failover", "roundrobin"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailers' => [
|
||||||
|
|
||||||
|
'smtp' => [
|
||||||
|
'transport' => 'smtp',
|
||||||
|
'scheme' => env('MAIL_SCHEME'),
|
||||||
|
'url' => env('MAIL_URL'),
|
||||||
|
'host' => env('MAIL_HOST', '127.0.0.1'),
|
||||||
|
'port' => env('MAIL_PORT', 2525),
|
||||||
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
'timeout' => null,
|
||||||
|
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'transport' => 'ses',
|
||||||
|
],
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'transport' => 'postmark',
|
||||||
|
// 'message_stream_id' => env('POSTMARK_MESSAGE_STREAM_ID'),
|
||||||
|
// 'client' => [
|
||||||
|
// 'timeout' => 5,
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
'resend' => [
|
||||||
|
'transport' => 'resend',
|
||||||
|
],
|
||||||
|
|
||||||
|
'sendmail' => [
|
||||||
|
'transport' => 'sendmail',
|
||||||
|
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'log' => [
|
||||||
|
'transport' => 'log',
|
||||||
|
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'array' => [
|
||||||
|
'transport' => 'array',
|
||||||
|
],
|
||||||
|
|
||||||
|
'failover' => [
|
||||||
|
'transport' => 'failover',
|
||||||
|
'mailers' => [
|
||||||
|
'smtp',
|
||||||
|
'log',
|
||||||
|
],
|
||||||
|
'retry_after' => 60,
|
||||||
|
],
|
||||||
|
|
||||||
|
'roundrobin' => [
|
||||||
|
'transport' => 'roundrobin',
|
||||||
|
'mailers' => [
|
||||||
|
'ses',
|
||||||
|
'postmark',
|
||||||
|
],
|
||||||
|
'retry_after' => 60,
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all emails sent by your application to be sent from
|
||||||
|
| the same address. Here you may specify a name and address that is
|
||||||
|
| used globally for all emails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Queue Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel's queue supports a variety of backends via a single, unified
|
||||||
|
| API, giving you convenient access to each backend using identical
|
||||||
|
| syntax for each. The default queue connection is defined below.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => env('QUEUE_CONNECTION', 'database'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queue Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the connection options for every queue backend
|
||||||
|
| used by your application. An example configuration is provided for
|
||||||
|
| each backend supported by Laravel. You're also free to add more.
|
||||||
|
|
|
||||||
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis",
|
||||||
|
| "deferred", "background", "failover", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => [
|
||||||
|
|
||||||
|
'sync' => [
|
||||||
|
'driver' => 'sync',
|
||||||
|
],
|
||||||
|
|
||||||
|
'database' => [
|
||||||
|
'driver' => 'database',
|
||||||
|
'connection' => env('DB_QUEUE_CONNECTION'),
|
||||||
|
'table' => env('DB_QUEUE_TABLE', 'jobs'),
|
||||||
|
'queue' => env('DB_QUEUE', 'default'),
|
||||||
|
'retry_after' => (int) env('DB_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'beanstalkd' => [
|
||||||
|
'driver' => 'beanstalkd',
|
||||||
|
'host' => env('BEANSTALKD_QUEUE_HOST', 'localhost'),
|
||||||
|
'queue' => env('BEANSTALKD_QUEUE', 'default'),
|
||||||
|
'retry_after' => (int) env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'block_for' => 0,
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'sqs' => [
|
||||||
|
'driver' => 'sqs',
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
|
||||||
|
'queue' => env('SQS_QUEUE', 'default'),
|
||||||
|
'suffix' => env('SQS_SUFFIX'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'redis' => [
|
||||||
|
'driver' => 'redis',
|
||||||
|
'connection' => env('REDIS_QUEUE_CONNECTION', 'default'),
|
||||||
|
'queue' => env('REDIS_QUEUE', 'default'),
|
||||||
|
'retry_after' => (int) env('REDIS_QUEUE_RETRY_AFTER', 90),
|
||||||
|
'block_for' => null,
|
||||||
|
'after_commit' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
'deferred' => [
|
||||||
|
'driver' => 'deferred',
|
||||||
|
],
|
||||||
|
|
||||||
|
'background' => [
|
||||||
|
'driver' => 'background',
|
||||||
|
],
|
||||||
|
|
||||||
|
'failover' => [
|
||||||
|
'driver' => 'failover',
|
||||||
|
'connections' => [
|
||||||
|
'database',
|
||||||
|
'deferred',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Job Batching
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following options configure the database and table that store job
|
||||||
|
| batching information. These options can be updated to any database
|
||||||
|
| connection and table which has been defined by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'batching' => [
|
||||||
|
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
'table' => 'job_batches',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Failed Queue Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These options configure the behavior of failed queue job logging so you
|
||||||
|
| can control how and where failed jobs are stored. Laravel ships with
|
||||||
|
| support for storing failed jobs in a simple file or in a database.
|
||||||
|
|
|
||||||
|
| Supported drivers: "database-uuids", "dynamodb", "file", "null"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => [
|
||||||
|
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
||||||
|
'database' => env('DB_CONNECTION', 'sqlite'),
|
||||||
|
'table' => 'failed_jobs',
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Third Party Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file is for storing the credentials for third party services such
|
||||||
|
| as Mailgun, Postmark, AWS and more. This file provides the de facto
|
||||||
|
| location for this type of information, allowing packages to have
|
||||||
|
| a conventional file to locate the various service credentials.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'postmark' => [
|
||||||
|
'key' => env('POSTMARK_API_KEY'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'resend' => [
|
||||||
|
'key' => env('RESEND_API_KEY'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'ses' => [
|
||||||
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||||
|
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||||
|
],
|
||||||
|
|
||||||
|
'slack' => [
|
||||||
|
'notifications' => [
|
||||||
|
'bot_user_oauth_token' => env('SLACK_BOT_USER_OAUTH_TOKEN'),
|
||||||
|
'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'yoco' => [
|
||||||
|
'mode' => env('YOCO_MODE', 'test'),
|
||||||
|
'secret_key' => env('YOCO_SECRET_KEY'),
|
||||||
|
'public_key' => env('YOCO_PUBLIC_KEY'),
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,217 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines the default session driver that is utilized for
|
||||||
|
| incoming requests. Laravel supports a variety of storage options to
|
||||||
|
| persist session data. Database storage is a great default choice.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "memcached",
|
||||||
|
| "redis", "dynamodb", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => env('SESSION_DRIVER', 'database'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the number of minutes that you wish the session
|
||||||
|
| to be allowed to remain idle before it expires. If you want them
|
||||||
|
| to expire immediately when the browser is closed then you may
|
||||||
|
| indicate that via the expire_on_close configuration option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => (int) env('SESSION_LIFETIME', 120),
|
||||||
|
|
||||||
|
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Encryption
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to easily specify that all of your session data
|
||||||
|
| should be encrypted before it's stored. All encryption is performed
|
||||||
|
| automatically by Laravel and you may use the session like normal.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encrypt' => env('SESSION_ENCRYPT', false),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session File Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing the "file" session driver, the session files are placed
|
||||||
|
| on disk. The default storage location is defined here; however, you
|
||||||
|
| are free to provide another location where they should be stored.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => storage_path('framework/sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" or "redis" session drivers, you may specify a
|
||||||
|
| connection that should be used to manage these sessions. This should
|
||||||
|
| correspond to a connection in your database configuration options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => env('SESSION_CONNECTION'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" session driver, you may specify the table to
|
||||||
|
| be used to store sessions. Of course, a sensible default is defined
|
||||||
|
| for you; however, you're welcome to change this to another table.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => env('SESSION_TABLE', 'sessions'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cache Store
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using one of the framework's cache driven session backends, you may
|
||||||
|
| define the cache store which should be used to store the session data
|
||||||
|
| between requests. This must match one of your defined cache stores.
|
||||||
|
|
|
||||||
|
| Affects: "dynamodb", "memcached", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'store' => env('SESSION_STORE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => [2, 100],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the session cookie that is created by
|
||||||
|
| the framework. Typically, you should not need to change this value
|
||||||
|
| since doing so does not grant a meaningful security improvement.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cookie' => env(
|
||||||
|
'SESSION_COOKIE',
|
||||||
|
Str::slug((string) env('APP_NAME', 'laravel')).'-session'
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application, but you're free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => env('SESSION_PATH', '/'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This value determines the domain and subdomains the session cookie is
|
||||||
|
| available to. By default, the cookie will be available to the root
|
||||||
|
| domain and all subdomains. Typically, this shouldn't be changed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => env('SESSION_DOMAIN'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you when it can't be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => env('SESSION_SECURE_COOKIE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTP Access Only
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will prevent JavaScript from accessing the
|
||||||
|
| value of the cookie and the cookie will only be accessible through
|
||||||
|
| the HTTP protocol. It's unlikely you should disable this option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'http_only' => env('SESSION_HTTP_ONLY', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Same-Site Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines how your cookies behave when cross-site requests
|
||||||
|
| take place, and can be used to mitigate CSRF attacks. By default, we
|
||||||
|
| will set this value to "lax" to permit secure cross-site requests.
|
||||||
|
|
|
||||||
|
| See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value
|
||||||
|
|
|
||||||
|
| Supported: "lax", "strict", "none", null
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'same_site' => env('SESSION_SAME_SITE', 'lax'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Partitioned Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Setting this value to true will tie the cookie to the top-level site for
|
||||||
|
| a cross-site context. Partitioned cookies are accepted by the browser
|
||||||
|
| when flagged "secure" and the Same-Site attribute is set to "none".
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'partitioned' => env('SESSION_PARTITIONED_COOKIE', false),
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
*.sqlite*
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Factories;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||||
|
*/
|
||||||
|
class UserFactory extends Factory
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The current password being used by the factory.
|
||||||
|
*/
|
||||||
|
protected static ?string $password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the model's default state.
|
||||||
|
*
|
||||||
|
* @return array<string, mixed>
|
||||||
|
*/
|
||||||
|
public function definition(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name' => fake()->name(),
|
||||||
|
'email' => fake()->unique()->safeEmail(),
|
||||||
|
'email_verified_at' => now(),
|
||||||
|
'password' => static::$password ??= Hash::make('password'),
|
||||||
|
'remember_token' => Str::random(10),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicate that the model's email address should be unverified.
|
||||||
|
*/
|
||||||
|
public function unverified(): static
|
||||||
|
{
|
||||||
|
return $this->state(fn (array $attributes) => [
|
||||||
|
'email_verified_at' => null,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('users', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('email')->unique();
|
||||||
|
$table->timestamp('email_verified_at')->nullable();
|
||||||
|
$table->string('password');
|
||||||
|
$table->rememberToken();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||||
|
$table->string('email')->primary();
|
||||||
|
$table->string('token');
|
||||||
|
$table->timestamp('created_at')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('sessions', function (Blueprint $table) {
|
||||||
|
$table->string('id')->primary();
|
||||||
|
$table->foreignId('user_id')->nullable()->index();
|
||||||
|
$table->string('ip_address', 45)->nullable();
|
||||||
|
$table->text('user_agent')->nullable();
|
||||||
|
$table->longText('payload');
|
||||||
|
$table->integer('last_activity')->index();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('users');
|
||||||
|
Schema::dropIfExists('password_reset_tokens');
|
||||||
|
Schema::dropIfExists('sessions');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('cache', function (Blueprint $table) {
|
||||||
|
$table->string('key')->primary();
|
||||||
|
$table->mediumText('value');
|
||||||
|
$table->integer('expiration');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('cache_locks', function (Blueprint $table) {
|
||||||
|
$table->string('key')->primary();
|
||||||
|
$table->string('owner');
|
||||||
|
$table->integer('expiration');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('cache');
|
||||||
|
Schema::dropIfExists('cache_locks');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('jobs', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('queue')->index();
|
||||||
|
$table->longText('payload');
|
||||||
|
$table->unsignedTinyInteger('attempts');
|
||||||
|
$table->unsignedInteger('reserved_at')->nullable();
|
||||||
|
$table->unsignedInteger('available_at');
|
||||||
|
$table->unsignedInteger('created_at');
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('job_batches', function (Blueprint $table) {
|
||||||
|
$table->string('id')->primary();
|
||||||
|
$table->string('name');
|
||||||
|
$table->integer('total_jobs');
|
||||||
|
$table->integer('pending_jobs');
|
||||||
|
$table->integer('failed_jobs');
|
||||||
|
$table->longText('failed_job_ids');
|
||||||
|
$table->mediumText('options')->nullable();
|
||||||
|
$table->integer('cancelled_at')->nullable();
|
||||||
|
$table->integer('created_at');
|
||||||
|
$table->integer('finished_at')->nullable();
|
||||||
|
});
|
||||||
|
|
||||||
|
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('uuid')->unique();
|
||||||
|
$table->text('connection');
|
||||||
|
$table->text('queue');
|
||||||
|
$table->longText('payload');
|
||||||
|
$table->longText('exception');
|
||||||
|
$table->timestamp('failed_at')->useCurrent();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('jobs');
|
||||||
|
Schema::dropIfExists('job_batches');
|
||||||
|
Schema::dropIfExists('failed_jobs');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('categories', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('slug')->unique();
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->string('image')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('categories');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('products', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->unsignedBigInteger('category_id')->nullable();
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('slug')->unique();
|
||||||
|
$table->text('description');
|
||||||
|
$table->decimal('price', 10, 2);
|
||||||
|
$table->string('image')->nullable();
|
||||||
|
$table->integer('stock')->default(0);
|
||||||
|
$table->boolean('featured')->default(false);
|
||||||
|
$table->timestamps();
|
||||||
|
$table->foreign('category_id')->references('id')->on('categories')->nullOnDelete();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('products');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('orders', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->unsignedBigInteger('user_id')->nullable();
|
||||||
|
$table->string('order_number')->unique();
|
||||||
|
$table->decimal('total', 12, 2);
|
||||||
|
$table->string('status')->default('pending');
|
||||||
|
$table->string('payment_method')->nullable();
|
||||||
|
$table->string('payment_status')->default('unpaid');
|
||||||
|
$table->text('shipping_address')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
$table->foreign('user_id')->references('id')->on('users')->nullOnDelete();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('orders');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('order_items', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->unsignedBigInteger('order_id');
|
||||||
|
$table->unsignedBigInteger('product_id');
|
||||||
|
$table->integer('quantity');
|
||||||
|
$table->decimal('price', 10, 2);
|
||||||
|
$table->timestamps();
|
||||||
|
$table->foreign('order_id')->references('id')->on('orders')->cascadeOnDelete();
|
||||||
|
$table->foreign('product_id')->references('id')->on('products')->cascadeOnDelete();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('order_items');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('order_items', function (Blueprint $table) {
|
||||||
|
$table->string('type')->default('wallpaper')->after('price');
|
||||||
|
$table->decimal('length', 8, 2)->nullable()->after('type');
|
||||||
|
$table->decimal('width', 8, 2)->nullable()->after('length');
|
||||||
|
$table->decimal('height', 8, 2)->nullable()->after('width');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('order_items', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['type', 'length', 'width', 'height']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
$table->string('customer_name')->after('user_id');
|
||||||
|
$table->string('customer_email')->after('customer_name');
|
||||||
|
$table->string('customer_phone')->after('customer_email');
|
||||||
|
$table->text('notes')->nullable()->after('shipping_address');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['customer_name', 'customer_email', 'customer_phone', 'notes']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('print_stocks', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name');
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->decimal('cost_per_meter', 10, 2)->nullable();
|
||||||
|
$table->decimal('cost_per_m2', 10, 2)->nullable();
|
||||||
|
$table->enum('type', ['wallpaper', 'mural', 'both'])->default('both');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('print_stocks');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('product_print_stocks', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->unsignedBigInteger('product_id');
|
||||||
|
$table->unsignedBigInteger('print_stock_id');
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
|
||||||
|
$table->foreign('print_stock_id')->references('id')->on('print_stocks')->onDelete('cascade');
|
||||||
|
$table->unique(['product_id', 'print_stock_id']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('product_print_stocks');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('order_items', function (Blueprint $table) {
|
||||||
|
$table->unsignedBigInteger('print_stock_id')->nullable()->after('product_id');
|
||||||
|
$table->foreign('print_stock_id')->references('id')->on('print_stocks')->onDelete('set null');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('order_items', function (Blueprint $table) {
|
||||||
|
$table->dropForeign(['print_stock_id']);
|
||||||
|
$table->dropColumn('print_stock_id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->boolean('is_admin')->default(false)->after('email');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('users', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('is_admin');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->enum('type', ['wallpaper', 'mural'])->default('wallpaper')->after('stock');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('product_images', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->foreignId('product_id')->constrained()->onDelete('cascade');
|
||||||
|
$table->string('image_path');
|
||||||
|
$table->integer('sort_order')->default(0);
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('product_images');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('print_stocks', function (Blueprint $table) {
|
||||||
|
$table->decimal('width', 8, 2)->default(1)->after('type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('print_stocks', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('width');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
// Check if uuid column already exists from previous failed migration
|
||||||
|
if (!Schema::hasColumn('orders', 'uuid')) {
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
// Add UUID column
|
||||||
|
$table->uuid('uuid')->nullable()->unique()->after('id');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Populate existing orders with UUIDs
|
||||||
|
DB::table('orders')->whereNull('uuid')->update([
|
||||||
|
'uuid' => DB::raw('UUID()')
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Make UUID non-nullable
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
$table->uuid('uuid')->nullable(false)->change();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Temporarily disable foreign key checks
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=0');
|
||||||
|
|
||||||
|
// Drop the foreign key constraint on order_items
|
||||||
|
DB::statement('ALTER TABLE `order_items` DROP FOREIGN KEY `order_items_order_id_foreign`');
|
||||||
|
|
||||||
|
// Change order_id column in order_items to uuid type first
|
||||||
|
// Get the UUID values from orders and map them to order_items
|
||||||
|
DB::statement('ALTER TABLE `order_items` MODIFY `order_id` CHAR(36) NULL');
|
||||||
|
|
||||||
|
// Update order_items with uuid values from orders
|
||||||
|
DB::statement('UPDATE `order_items` oi INNER JOIN `orders` o ON oi.order_id = o.id SET oi.order_id = o.uuid');
|
||||||
|
|
||||||
|
// Make order_id non-nullable
|
||||||
|
DB::statement('ALTER TABLE `order_items` MODIFY `order_id` CHAR(36) NOT NULL');
|
||||||
|
|
||||||
|
// Remove auto_increment from id column, then drop it and make uuid the primary key
|
||||||
|
DB::statement('ALTER TABLE `orders` MODIFY `id` INT NOT NULL');
|
||||||
|
DB::statement('ALTER TABLE `orders` DROP PRIMARY KEY, ADD PRIMARY KEY (`uuid`)');
|
||||||
|
DB::statement('ALTER TABLE `orders` DROP COLUMN `id`');
|
||||||
|
|
||||||
|
// Recreate the foreign key constraint on order_items pointing to uuid
|
||||||
|
DB::statement('ALTER TABLE `order_items` ADD CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders`(`uuid`) ON DELETE CASCADE');
|
||||||
|
|
||||||
|
// Re-enable foreign key checks
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=1');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
// Disable foreign key checks
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=0');
|
||||||
|
|
||||||
|
// Drop the uuid-based foreign key
|
||||||
|
DB::statement('ALTER TABLE `order_items` DROP FOREIGN KEY `order_items_order_id_foreign`');
|
||||||
|
|
||||||
|
// Check if id column still exists, if not we need to restore it
|
||||||
|
if (!Schema::hasColumn('orders', 'id')) {
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
$table->id()->first();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert order_id back to integer and update references
|
||||||
|
DB::statement('ALTER TABLE `order_items` MODIFY `order_id` BIGINT UNSIGNED NULL');
|
||||||
|
|
||||||
|
// Update order_items with id values from orders
|
||||||
|
DB::statement('UPDATE `order_items` oi INNER JOIN `orders` o ON oi.order_id = o.uuid SET oi.order_id = o.id');
|
||||||
|
|
||||||
|
// Make order_id non-nullable
|
||||||
|
DB::statement('ALTER TABLE `order_items` MODIFY `order_id` BIGINT UNSIGNED NOT NULL');
|
||||||
|
|
||||||
|
// Recreate the original foreign key pointing to id
|
||||||
|
DB::statement('ALTER TABLE `order_items` ADD CONSTRAINT `order_items_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders`(`id`) ON DELETE CASCADE');
|
||||||
|
|
||||||
|
// Drop uuid column if it exists
|
||||||
|
if (Schema::hasColumn('orders', 'uuid')) {
|
||||||
|
Schema::table('orders', function (Blueprint $table) {
|
||||||
|
$table->dropUnique(['uuid']);
|
||||||
|
$table->dropColumn('uuid');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Re-enable foreign key checks
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=1');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('hero_images', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->enum('page', ['home', 'wallpaper', 'mural']);
|
||||||
|
$table->string('image_path');
|
||||||
|
$table->string('title');
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->string('button_text')->nullable();
|
||||||
|
$table->string('button_link')->nullable();
|
||||||
|
$table->integer('sort_order')->default(0);
|
||||||
|
$table->boolean('is_active')->default(true);
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->index('page');
|
||||||
|
$table->index('is_active');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('hero_images');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
|
||||||
|
class AdminUserSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
User::create([
|
||||||
|
'name' => 'Admin User',
|
||||||
|
'email' => 'admin@additionaldesign.com',
|
||||||
|
'password' => Hash::make('password'),
|
||||||
|
'is_admin' => true,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder
|
||||||
|
{
|
||||||
|
use WithoutModelEvents;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Seed the application's database.
|
||||||
|
*/
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
$this->call([
|
||||||
|
AdminUserSeeder::class,
|
||||||
|
ProductSeeder::class,
|
||||||
|
PrintStockSeeder::class,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use App\Models\PrintStock;
|
||||||
|
use App\Models\Product;
|
||||||
|
|
||||||
|
class PrintStockSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
$stocks = [
|
||||||
|
[
|
||||||
|
'name' => 'Standard Matte',
|
||||||
|
'description' => 'Classic matte finish wallpaper. Professional appearance with subtle texture.',
|
||||||
|
'cost_per_meter' => 8.50,
|
||||||
|
'cost_per_m2' => 85.00,
|
||||||
|
'type' => 'both'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Premium Silk',
|
||||||
|
'description' => 'Smooth silk finish with subtle sheen. Elegant and durable.',
|
||||||
|
'cost_per_meter' => 12.50,
|
||||||
|
'cost_per_m2' => 125.00,
|
||||||
|
'type' => 'both'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Luxury Velvet',
|
||||||
|
'description' => 'Rich velvet texture with premium feel. High-end luxury option.',
|
||||||
|
'cost_per_meter' => 16.00,
|
||||||
|
'cost_per_m2' => 160.00,
|
||||||
|
'type' => 'both'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Canvas',
|
||||||
|
'description' => 'Textured canvas finish. Great for artistic designs.',
|
||||||
|
'cost_per_meter' => 14.00,
|
||||||
|
'cost_per_m2' => 140.00,
|
||||||
|
'type' => 'both'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Glossy',
|
||||||
|
'description' => 'Shiny glossy finish. Vibrant colors and easy to clean.',
|
||||||
|
'cost_per_meter' => 10.00,
|
||||||
|
'cost_per_m2' => 100.00,
|
||||||
|
'type' => 'both'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($stocks as $stock) {
|
||||||
|
PrintStock::create($stock);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach all stocks to all products
|
||||||
|
$products = Product::all();
|
||||||
|
$stockIds = PrintStock::pluck('id')->toArray();
|
||||||
|
|
||||||
|
foreach ($products as $product) {
|
||||||
|
$product->printStocks()->sync($stockIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,266 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use App\Models\Category;
|
||||||
|
use App\Models\Product;
|
||||||
|
|
||||||
|
class ProductSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*/
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
// Create categories
|
||||||
|
$categories = [
|
||||||
|
[
|
||||||
|
'name' => 'Botanical',
|
||||||
|
'slug' => 'botanical',
|
||||||
|
'description' => 'Organic prints featuring flora and nature-inspired designs.',
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1518895949257-7621c3c786d7?w=400&q=80'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Vintage',
|
||||||
|
'slug' => 'vintage',
|
||||||
|
'description' => 'Timeless patterns with a nostalgic charm and elegance.',
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1631049307264-da0ec9d70304?w=500&q=80'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Modern Murals',
|
||||||
|
'slug' => 'modern-murals',
|
||||||
|
'description' => 'Bold, statement-making designs for contemporary spaces.',
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1460661419201-fd4cecdf8a8b?w=400&q=80'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Texture',
|
||||||
|
'slug' => 'texture',
|
||||||
|
'description' => 'Dimensional prints that add depth and tactile interest.',
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1578926078328-123alce3f3ce?w=400&q=80'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Floral',
|
||||||
|
'slug' => 'floral',
|
||||||
|
'description' => 'Exquisite flower-based patterns in varied aesthetics.',
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1520763185298-1b434c919eba?w=400&q=80'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Geometric',
|
||||||
|
'slug' => 'geometric',
|
||||||
|
'description' => 'Clean lines and striking forms for minimalist design.',
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1577720643272-265f434b3f6f?w=400&q=80'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($categories as $category) {
|
||||||
|
Category::create($category);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create products
|
||||||
|
$products = [
|
||||||
|
// Botanical wallpapers
|
||||||
|
[
|
||||||
|
'category_id' => 1,
|
||||||
|
'name' => 'Serenity Bloom',
|
||||||
|
'slug' => 'serenity-bloom',
|
||||||
|
'description' => 'Soft botanical watercolors perfect for bedroom spaces. Creates a peaceful, nature-inspired atmosphere.',
|
||||||
|
'price' => 64.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1577720643272-265f434b3f6f?w=500&q=80',
|
||||||
|
'stock' => 50,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 1,
|
||||||
|
'name' => 'Tropical Paradise',
|
||||||
|
'slug' => 'tropical-paradise',
|
||||||
|
'description' => 'Vibrant tropical foliage for adventurous interiors. Brings warmth and energy to any room.',
|
||||||
|
'price' => 62.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1520763185298-1b434c919eba?w=500&q=80',
|
||||||
|
'stock' => 45,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 1,
|
||||||
|
'name' => 'Coastal Breeze',
|
||||||
|
'slug' => 'coastal-breeze',
|
||||||
|
'description' => 'Serene seaside-inspired patterns in soft blues. Brings a refreshing, airy feel to spaces.',
|
||||||
|
'price' => 61.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1505142468610-359e7d316be0?w=500&q=80',
|
||||||
|
'stock' => 40,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 1,
|
||||||
|
'name' => 'Forest Canopy',
|
||||||
|
'slug' => 'forest-canopy',
|
||||||
|
'description' => 'Deep greens and natural textures inspired by forest landscapes.',
|
||||||
|
'price' => 63.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1518895949257-7621c3c786d7?w=500&q=80',
|
||||||
|
'stock' => 35,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
|
||||||
|
// Vintage wallpapers
|
||||||
|
[
|
||||||
|
'category_id' => 2,
|
||||||
|
'name' => 'Heritage Gold',
|
||||||
|
'slug' => 'heritage-gold',
|
||||||
|
'description' => 'Ornamental pattern with metallic accents. Adds elegance and timeless sophistication.',
|
||||||
|
'price' => 72.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1578500494198-246f612d03b3?w=500&q=80',
|
||||||
|
'stock' => 30,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 2,
|
||||||
|
'name' => 'Antique Damask',
|
||||||
|
'slug' => 'antique-damask',
|
||||||
|
'description' => 'Classic damask pattern with vintage charm and luxury appeal.',
|
||||||
|
'price' => 70.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1578500494198-246f612d03b3?w=500&q=80',
|
||||||
|
'stock' => 28,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
|
||||||
|
// Modern Murals (per m²)
|
||||||
|
[
|
||||||
|
'category_id' => 3,
|
||||||
|
'name' => 'Abstract Vision',
|
||||||
|
'slug' => 'abstract-vision',
|
||||||
|
'description' => 'Bold abstract designs perfect for making a statement in any space. Single non-repeating image.',
|
||||||
|
'price' => 155.00,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1460661419201-fd4cecdf8a8b?w=500&q=80',
|
||||||
|
'stock' => 15,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'mural'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 3,
|
||||||
|
'name' => 'Urban Sunset',
|
||||||
|
'slug' => 'urban-sunset',
|
||||||
|
'description' => 'Breathtaking cityscape at dusk. Perfect for modern living spaces and offices.',
|
||||||
|
'price' => 168.00,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=500&q=80',
|
||||||
|
'stock' => 12,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'mural'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 3,
|
||||||
|
'name' => 'Mountain Peak',
|
||||||
|
'slug' => 'mountain-peak',
|
||||||
|
'description' => 'Dramatic mountain landscape mural for inspiring spaces. Brings nature indoors.',
|
||||||
|
'price' => 145.00,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=500&q=80',
|
||||||
|
'stock' => 10,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'mural'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 3,
|
||||||
|
'name' => 'Ocean Waves',
|
||||||
|
'slug' => 'ocean-waves',
|
||||||
|
'description' => 'Serene ocean waves in calming blues. Perfect for creating peaceful environments.',
|
||||||
|
'price' => 138.00,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1505142468610-359e7d316be0?w=500&q=80',
|
||||||
|
'stock' => 8,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'mural'
|
||||||
|
],
|
||||||
|
|
||||||
|
// Texture wallpapers
|
||||||
|
[
|
||||||
|
'category_id' => 4,
|
||||||
|
'name' => 'Marble Dream',
|
||||||
|
'slug' => 'marble-dream',
|
||||||
|
'description' => 'Luxurious marble texture wallpaper for elegant spaces. Adds depth and sophistication.',
|
||||||
|
'price' => 68.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1578926078328-123alce3f3ce?w=500&q=80',
|
||||||
|
'stock' => 32,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 4,
|
||||||
|
'name' => 'Stone Elegance',
|
||||||
|
'slug' => 'stone-elegance',
|
||||||
|
'description' => 'Natural stone textures that create a sophisticated backdrop.',
|
||||||
|
'price' => 66.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1578926078328-123alce3f3ce?w=500&q=80',
|
||||||
|
'stock' => 29,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
|
||||||
|
// Floral wallpapers
|
||||||
|
[
|
||||||
|
'category_id' => 5,
|
||||||
|
'name' => 'Crimson Velvet',
|
||||||
|
'slug' => 'crimson-velvet',
|
||||||
|
'description' => 'Luxe floral design in rich, deep tones. Creates a dramatic, sophisticated atmosphere.',
|
||||||
|
'price' => 66.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1581092918056-0c4c3acd3789?w=500&q=80',
|
||||||
|
'stock' => 27,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 5,
|
||||||
|
'name' => 'Rose Garden',
|
||||||
|
'slug' => 'rose-garden',
|
||||||
|
'description' => 'Delicate rose patterns perfect for romantic and elegant interiors.',
|
||||||
|
'price' => 65.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1581092918056-0c4c3acd3789?w=500&q=80',
|
||||||
|
'stock' => 24,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
|
||||||
|
// Geometric wallpapers
|
||||||
|
[
|
||||||
|
'category_id' => 6,
|
||||||
|
'name' => 'Urban Grid',
|
||||||
|
'slug' => 'urban-grid',
|
||||||
|
'description' => 'Contemporary geometric pattern for modern interiors. Perfect for creating bold, structured spaces.',
|
||||||
|
'price' => 59.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1557672172-298e090d0f80?w=500&q=80',
|
||||||
|
'stock' => 38,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 6,
|
||||||
|
'name' => 'Minimalist Zen',
|
||||||
|
'slug' => 'minimalist-zen',
|
||||||
|
'description' => 'Clean, serene design with Japanese-inspired aesthetics. Perfect for creating calm spaces.',
|
||||||
|
'price' => 55.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1511884642898-4c92249e20b6?w=500&q=80',
|
||||||
|
'stock' => 42,
|
||||||
|
'featured' => true,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'category_id' => 6,
|
||||||
|
'name' => 'Graphic Statements',
|
||||||
|
'slug' => 'graphic-statements',
|
||||||
|
'description' => 'Bold abstract graphics for contemporary spaces. Makes a powerful design statement.',
|
||||||
|
'price' => 65.99,
|
||||||
|
'image' => 'https://images.unsplash.com/photo-1577720643272-265f434b3f6f?w=500&q=80',
|
||||||
|
'stock' => 33,
|
||||||
|
'featured' => false,
|
||||||
|
'type' => 'wallpaper'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($products as $product) {
|
||||||
|
Product::create($product);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://www.schemastore.org/package.json",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"build": "vite build",
|
||||||
|
"dev": "vite"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tailwindcss/vite": "^4.0.0",
|
||||||
|
"axios": "^1.11.0",
|
||||||
|
"concurrently": "^9.0.1",
|
||||||
|
"laravel-vite-plugin": "^2.0.0",
|
||||||
|
"tailwindcss": "^4.0.0",
|
||||||
|
"vite": "^7.0.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Unit">
|
||||||
|
<directory>tests/Unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="Feature">
|
||||||
|
<directory>tests/Feature</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<source>
|
||||||
|
<include>
|
||||||
|
<directory>app</directory>
|
||||||
|
</include>
|
||||||
|
</source>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
|
||||||
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
|
<env name="BROADCAST_CONNECTION" value="null"/>
|
||||||
|
<env name="CACHE_STORE" value="array"/>
|
||||||
|
<env name="DB_CONNECTION" value="sqlite"/>
|
||||||
|
<env name="DB_DATABASE" value=":memory:"/>
|
||||||
|
<env name="MAIL_MAILER" value="array"/>
|
||||||
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
<env name="PULSE_ENABLED" value="false"/>
|
||||||
|
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||||
|
<env name="NIGHTWATCH_ENABLED" value="false"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews -Indexes
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Handle Authorization Header
|
||||||
|
RewriteCond %{HTTP:Authorization} .
|
||||||
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
|
# Handle X-XSRF-Token Header
|
||||||
|
RewriteCond %{HTTP:x-xsrf-token} .
|
||||||
|
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
|
# Send Requests To Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
</IfModule>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||||
|
<path d="M9.75 2.56944C9.75 3.29815 8.07107 3.88889 6 3.88889C3.92893 3.88889 2.25 3.29815 2.25 2.56944M9.75 2.56944C9.75 1.84074 8.07107 1.25 6 1.25C3.92893 1.25 2.25 1.84074 2.25 2.56944M9.75 2.56944V9.43056C9.75 10.1593 8.07107 10.75 6 10.75C3.92893 10.75 2.25 10.1593 2.25 9.43056V2.56944M9.75 5.94434C9.75 6.67304 8.07107 7.26378 6 7.26378C3.92893 7.26378 2.25 6.67304 2.25 5.94434" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/icons/database.blade.php ENDPATH**/ ?>
|
||||||
|
After Width: | Height: | Size: 780 B |
@@ -0,0 +1,83 @@
|
|||||||
|
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||||
|
|
||||||
|
$__newAttributes = [];
|
||||||
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['method']));
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (in_array($__key, $__propNames)) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
} else {
|
||||||
|
$__newAttributes[$__key] = $__value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||||
|
|
||||||
|
unset($__propNames);
|
||||||
|
unset($__newAttributes);
|
||||||
|
|
||||||
|
foreach (array_filter((['method']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$__defined_vars = get_defined_vars();
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($__defined_vars, $__key, $__value); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$type = match ($method) {
|
||||||
|
'GET', 'OPTIONS', 'ANY' => 'default',
|
||||||
|
'POST' => 'success',
|
||||||
|
'PUT', 'PATCH' => 'primary',
|
||||||
|
'DELETE' => 'error',
|
||||||
|
default => 'default',
|
||||||
|
};
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.badge','data' => ['type' => ''.e($type).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::badge'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['type' => ''.e($type).'']); ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginalba2eecb54ab69c011eea9820c76048d8 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginalba2eecb54ab69c011eea9820c76048d8 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.globe','data' => ['class' => 'w-2.5 h-2.5']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::icons.globe'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'w-2.5 h-2.5']); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginalba2eecb54ab69c011eea9820c76048d8)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginalba2eecb54ab69c011eea9820c76048d8; ?>
|
||||||
|
<?php unset($__attributesOriginalba2eecb54ab69c011eea9820c76048d8); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginalba2eecb54ab69c011eea9820c76048d8)): ?>
|
||||||
|
<?php $component = $__componentOriginalba2eecb54ab69c011eea9820c76048d8; ?>
|
||||||
|
<?php unset($__componentOriginalba2eecb54ab69c011eea9820c76048d8); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo e($method); ?>
|
||||||
|
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb; ?>
|
||||||
|
<?php unset($__attributesOriginal0bc865510ef3ecddbe48edc4e8cc9ddb); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb)): ?>
|
||||||
|
<?php $component = $__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb; ?>
|
||||||
|
<?php unset($__componentOriginal0bc865510ef3ecddbe48edc4e8cc9ddb); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/http-method.blade.php ENDPATH**/ ?>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||||
|
<g clip-path="url(#clip0_14732_6211)">
|
||||||
|
<path d="M1.75 5.25V2.75C1.75 1.922 2.422 1.25 3.25 1.25H4.202C4.808 1.25 5.381 1.525 5.761 1.998L6.364 2.75H8.25C9.355 2.75 10.25 3.645 10.25 4.75V5.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M2.46801 5.25H9.53101C10.44 5.25 11.14 6.052 11.017 6.953L10.735 9.021C10.6 10.012 9.75301 10.751 8.75301 10.751H3.24601C2.24601 10.751 1.39901 10.012 1.26401 9.021L0.982011 6.953C0.859011 6.052 1.55901 5.25 2.46801 5.25Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_14732_6211">
|
||||||
|
<rect width="12" height="12" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/icons/folder-open.blade.php ENDPATH**/ ?>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,6 @@
|
|||||||
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||||
|
<path d="M2.75 2.75H5.614L5.316 2.114C5.069 1.587 4.54 1.25 3.958 1.25H2.25C1.422 1.25 0.75 1.922 0.75 2.75V4.75C0.75 3.645 1.645 2.75 2.75 2.75Z" />
|
||||||
|
<path d="M0.75 4.75V2.75C0.75 1.922 1.422 1.25 2.25 1.25H3.958C4.54 1.25 5.069 1.587 5.316 2.114L5.614 2.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M2.75 2.75H9.25C10.355 2.75 11.25 3.645 11.25 4.75V8.25C11.25 9.355 10.355 10.25 9.25 10.25H2.75C1.645 10.25 0.75 9.355 0.75 8.25V4.75C0.75 3.645 1.645 2.75 2.75 2.75Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/icons/folder.blade.php ENDPATH**/ ?>
|
||||||
|
After Width: | Height: | Size: 906 B |
@@ -0,0 +1,115 @@
|
|||||||
|
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||||
|
|
||||||
|
$__newAttributes = [];
|
||||||
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['title', 'markdown']));
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (in_array($__key, $__propNames)) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
} else {
|
||||||
|
$__newAttributes[$__key] = $__value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||||
|
|
||||||
|
unset($__propNames);
|
||||||
|
unset($__newAttributes);
|
||||||
|
|
||||||
|
foreach (array_filter((['title', 'markdown']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$__defined_vars = get_defined_vars();
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($__defined_vars, $__key, $__value); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const markdown = <?php echo e(Illuminate\Support\Js::from($markdown)); ?>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="flex items-center justify-between"
|
||||||
|
x-data="{
|
||||||
|
copied: false,
|
||||||
|
async copyToClipboard() {
|
||||||
|
try {
|
||||||
|
await window.copyToClipboard(markdown);
|
||||||
|
this.copied = true;
|
||||||
|
setTimeout(() => { this.copied = false }, 3000);
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Failed to copy the markdown: ', err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div class="flex items-center gap-2 h-[56px]">
|
||||||
|
<div class="w-[18px] h-[18px] flex items-center justify-center bg-rose-500 rounded-md">
|
||||||
|
<svg width="2" height="10" class="text-white" viewBox="0 0 2 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M1.00006 6.3188C1.41416 6.3188 1.75006 5.98295 1.75006 5.56885V1.43115C1.75006 1.01705 1.41416 0.681152 1.00006 0.681152C0.585961 0.681152 0.250061 1.01705 0.250061 1.43115V5.56885C0.250061 5.98295 0.585961 6.3188 1.00006 6.3188Z" fill="currentColor" />
|
||||||
|
<path d="M1.00006 9.41699C1.55235 9.41699 2.00007 8.96929 2.00007 8.41699C2.00007 7.86469 1.55235 7.41699 1.00006 7.41699C0.447781 7.41699 6.10352e-05 7.86469 6.10352e-05 8.41699C6.10352e-05 8.96929 0.447781 9.41699 1.00006 9.41699Z" fill="currentColor "/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div class="font-medium text-sm text-neutral-900 dark:text-white">
|
||||||
|
<?php echo e($title); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
x-cloak
|
||||||
|
class="<?php echo \Illuminate\Support\Arr::toCssClasses([
|
||||||
|
"text-sm rounded-md border px-3 h-8 flex items-center gap-2 transition-colors duration-200 ease-in-out cursor-pointer shadow-xs",
|
||||||
|
"text-neutral-600 dark:text-neutral-400 bg-white/5 border-neutral-200 hover:bg-neutral-100 dark:bg-white/5 dark:border-white/10 dark:hover:bg-white/10",
|
||||||
|
]); ?>"
|
||||||
|
@click="copyToClipboard()"
|
||||||
|
>
|
||||||
|
<?php if (isset($component)) { $__componentOriginal8894ff2e6e6bd543865d608162806b35 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal8894ff2e6e6bd543865d608162806b35 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.copy','data' => ['class' => 'w-3 h-3','xShow' => '!copied']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::icons.copy'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'w-3 h-3','x-show' => '!copied']); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal8894ff2e6e6bd543865d608162806b35)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal8894ff2e6e6bd543865d608162806b35; ?>
|
||||||
|
<?php unset($__attributesOriginal8894ff2e6e6bd543865d608162806b35); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal8894ff2e6e6bd543865d608162806b35)): ?>
|
||||||
|
<?php $component = $__componentOriginal8894ff2e6e6bd543865d608162806b35; ?>
|
||||||
|
<?php unset($__componentOriginal8894ff2e6e6bd543865d608162806b35); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginal394a4f59b8774713925fcf456ba90b57 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal394a4f59b8774713925fcf456ba90b57 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.icons.check','data' => ['class' => 'w-3 h-3 text-emerald-500','xShow' => 'copied']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::icons.check'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'w-3 h-3 text-emerald-500','x-show' => 'copied']); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal394a4f59b8774713925fcf456ba90b57)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal394a4f59b8774713925fcf456ba90b57; ?>
|
||||||
|
<?php unset($__attributesOriginal394a4f59b8774713925fcf456ba90b57); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal394a4f59b8774713925fcf456ba90b57)): ?>
|
||||||
|
<?php $component = $__componentOriginal394a4f59b8774713925fcf456ba90b57; ?>
|
||||||
|
<?php unset($__componentOriginal394a4f59b8774713925fcf456ba90b57); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<span x-text="copied ? 'Copied to clipboard' : 'Copy as Markdown'"></span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/topbar.blade.php ENDPATH**/ ?>
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||||
|
|
||||||
|
$__newAttributes = [];
|
||||||
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['type' => 'default', 'variant' => 'soft']));
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (in_array($__key, $__propNames)) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
} else {
|
||||||
|
$__newAttributes[$__key] = $__value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||||
|
|
||||||
|
unset($__propNames);
|
||||||
|
unset($__newAttributes);
|
||||||
|
|
||||||
|
foreach (array_filter((['type' => 'default', 'variant' => 'soft']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$__defined_vars = get_defined_vars();
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($__defined_vars, $__key, $__value); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$baseClasses = 'inline-flex w-fit shrink-0 items-center justify-center gap-1 font-mono leading-3 uppercase transition-colors dark:border [&_svg]:size-2.5 h-6 min-w-5 rounded-md px-1.5 text-xs/none';
|
||||||
|
|
||||||
|
$types = [
|
||||||
|
'default' => [
|
||||||
|
'soft' => 'bg-black/8 text-neutral-900 dark:border-neutral-700 dark:bg-white/10 dark:text-neutral-100',
|
||||||
|
'solid' => 'bg-neutral-600 text-neutral-100 dark:border-neutral-500 dark:bg-neutral-600',
|
||||||
|
],
|
||||||
|
'success' => [
|
||||||
|
'soft' => 'bg-emerald-200 text-emerald-900 dark:border-emerald-600 dark:bg-emerald-900/70 dark:text-emerald-400',
|
||||||
|
'solid' => 'bg-emerald-600 dark:border-emerald-500 dark:bg-emerald-600',
|
||||||
|
],
|
||||||
|
'primary' => [
|
||||||
|
'soft' => 'bg-blue-100 text-blue-900 dark:border-blue-800 dark:bg-blue-950 dark:text-blue-300',
|
||||||
|
'solid' => 'bg-blue-700 dark:border-blue-600 dark:bg-blue-700',
|
||||||
|
],
|
||||||
|
'error' => [
|
||||||
|
'soft' => 'bg-rose-200 text-rose-900 dark:border-rose-900 dark:bg-rose-950 dark:text-rose-100 dark:[&_svg]:!text-white',
|
||||||
|
'solid' => 'bg-rose-600 dark:border-rose-500 dark:bg-rose-600',
|
||||||
|
],
|
||||||
|
'alert' => [
|
||||||
|
'soft' => 'bg-amber-200 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-300',
|
||||||
|
'solid' => 'bg-amber-600 dark:border-amber-500 dark:bg-amber-600',
|
||||||
|
],
|
||||||
|
'white' => [
|
||||||
|
'soft' => 'bg-white text-neutral-900 dark:border-neutral-700 dark:bg-neutral-800 dark:text-neutral-100',
|
||||||
|
'solid' => 'bg-black/10 text-neutral-900 dark:text-neutral-900 dark:bg-white',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$variants = [
|
||||||
|
'soft' => '',
|
||||||
|
'solid' => 'text-white dark:text-white [&_svg]:!text-white',
|
||||||
|
];
|
||||||
|
|
||||||
|
$typeClasses = $types[$type][$variant] ?? $types['default']['soft'];
|
||||||
|
$variantClasses = $variants[$variant] ?? $variants['soft'];
|
||||||
|
|
||||||
|
$classes = implode(' ', [$baseClasses, $typeClasses, $variantClasses]);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div <?php echo e($attributes->merge(['class' => $classes])); ?>>
|
||||||
|
<?php echo e($slot); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/badge.blade.php ENDPATH**/ ?>
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;
|
||||||
|
|
||||||
|
$__newAttributes = [];
|
||||||
|
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['frame']));
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (in_array($__key, $__propNames)) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
} else {
|
||||||
|
$__newAttributes[$__key] = $__value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);
|
||||||
|
|
||||||
|
unset($__propNames);
|
||||||
|
unset($__newAttributes);
|
||||||
|
|
||||||
|
foreach (array_filter((['frame']), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
|
||||||
|
$$__key = $$__key ?? $__value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$__defined_vars = get_defined_vars();
|
||||||
|
|
||||||
|
foreach ($attributes->all() as $__key => $__value) {
|
||||||
|
if (array_key_exists($__key, $__defined_vars)) unset($$__key);
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($__defined_vars, $__key, $__value); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($class = $frame->class()) {
|
||||||
|
$source = $class;
|
||||||
|
|
||||||
|
if ($previous = $frame->previous()) {
|
||||||
|
$source .= $previous->operator();
|
||||||
|
$source .= $previous->callable();
|
||||||
|
$source .= '('.implode(', ', $previous->args()).')';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$source = $frame->source();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal12cb286571f553eebcbe98210b217f94 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal12cb286571f553eebcbe98210b217f94 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.syntax-highlight','data' => ['code' => $source,'language' => 'php','truncate' => true,'class' => 'text-xs min-w-0','dataTippyContent' => ''.e($source).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::syntax-highlight'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['code' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($source),'language' => 'php','truncate' => true,'class' => 'text-xs min-w-0','data-tippy-content' => ''.e($source).'']); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||||
|
<?php unset($__attributesOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal12cb286571f553eebcbe98210b217f94)): ?>
|
||||||
|
<?php $component = $__componentOriginal12cb286571f553eebcbe98210b217f94; ?>
|
||||||
|
<?php unset($__componentOriginal12cb286571f553eebcbe98210b217f94); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/formatted-source.blade.php ENDPATH**/ ?>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||||
|
<g clip-path="url(#clip0_14732_6105)">
|
||||||
|
<path d="M9.87466 7.8287L5.92654 0.549947C5.82917 0.369362 5.68068 0.221523 5.49966 0.124947C5.25374 -0.00665839 4.9658 -0.0358401 4.69847 0.0437494C4.43115 0.123339 4.20606 0.305262 4.07216 0.549947L0.124664 7.8287C0.0383472 7.98887 -0.00481098 8.16875 -0.000569449 8.35066C0.00367208 8.53256 0.0551674 8.71024 0.148856 8.86622C0.242546 9.0222 0.375205 9.15112 0.533798 9.24031C0.692391 9.32951 0.871462 9.37591 1.05341 9.37495H8.94591C9.12031 9.37495 9.29203 9.33202 9.44591 9.24995C9.56783 9.18524 9.67572 9.09703 9.76338 8.99041C9.85104 8.8838 9.91672 8.76088 9.95663 8.62876C9.99655 8.49663 10.0099 8.35791 9.99595 8.22059C9.98199 8.08328 9.94036 7.95009 9.87466 7.8287ZM4.99966 8.12495C4.87605 8.12495 4.75521 8.08829 4.65243 8.01962C4.54965 7.95094 4.46954 7.85333 4.42224 7.73912C4.37493 7.62492 4.36256 7.49925 4.38667 7.37802C4.41079 7.25678 4.47031 7.14541 4.55772 7.05801C4.64513 6.9706 4.75649 6.91107 4.87773 6.88696C4.99897 6.86284 5.12464 6.87522 5.23884 6.92252C5.35304 6.96983 5.45066 7.04993 5.51933 7.15272C5.58801 7.2555 5.62466 7.37633 5.62466 7.49995C5.62466 7.66571 5.55882 7.82468 5.44161 7.94189C5.3244 8.0591 5.16542 8.12495 4.99966 8.12495ZM5.62466 5.93745C5.62466 6.02033 5.59174 6.09981 5.53313 6.15842C5.47453 6.21702 5.39504 6.24995 5.31216 6.24995H4.68716C4.60428 6.24995 4.5248 6.21702 4.46619 6.15842C4.40759 6.09981 4.37466 6.02033 4.37466 5.93745V3.43745C4.37466 3.35457 4.40759 3.27508 4.46619 3.21648C4.5248 3.15787 4.60428 3.12495 4.68716 3.12495H5.31216C5.39504 3.12495 5.47453 3.15787 5.53313 3.21648C5.59174 3.27508 5.62466 3.35457 5.62466 3.43745V5.93745Z" fill="currentColor" />
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_14732_6105">
|
||||||
|
<rect width="10" height="10" />
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/icons/alert.blade.php ENDPATH**/ ?>
|
||||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,393 @@
|
|||||||
|
<?php if (isset($component)) { $__componentOriginalbbd4eeea836234825f7514ed20d2d52d = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginalbbd4eeea836234825f7514ed20d2d52d = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.layout','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::layout'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes([]); ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.section-container','data' => ['class' => 'px-6 py-0 sm:py-0']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::section-container'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'px-6 py-0 sm:py-0']); ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginal6769184c81828596613858780a973bc6 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal6769184c81828596613858780a973bc6 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.topbar','data' => ['title' => $exception->title(),'markdown' => $exceptionAsMarkdown]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::topbar'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception->title()),'markdown' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exceptionAsMarkdown)]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal6769184c81828596613858780a973bc6)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal6769184c81828596613858780a973bc6; ?>
|
||||||
|
<?php unset($__attributesOriginal6769184c81828596613858780a973bc6); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal6769184c81828596613858780a973bc6)): ?>
|
||||||
|
<?php $component = $__componentOriginal6769184c81828596613858780a973bc6; ?>
|
||||||
|
<?php unset($__componentOriginal6769184c81828596613858780a973bc6); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $component = $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal40a3de7997c05e5562c4104d90e9b634 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal40a3de7997c05e5562c4104d90e9b634 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.separator','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::separator'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes([]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $component = $__componentOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__componentOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.section-container','data' => ['class' => 'flex flex-col gap-8 py-0 sm:py-0']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::section-container'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'flex flex-col gap-8 py-0 sm:py-0']); ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginal1e817eb3c41fe3ea9eb0c15213c4b557 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal1e817eb3c41fe3ea9eb0c15213c4b557 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.header','data' => ['exception' => $exception]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::header'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['exception' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception)]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal1e817eb3c41fe3ea9eb0c15213c4b557)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal1e817eb3c41fe3ea9eb0c15213c4b557; ?>
|
||||||
|
<?php unset($__attributesOriginal1e817eb3c41fe3ea9eb0c15213c4b557); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal1e817eb3c41fe3ea9eb0c15213c4b557)): ?>
|
||||||
|
<?php $component = $__componentOriginal1e817eb3c41fe3ea9eb0c15213c4b557; ?>
|
||||||
|
<?php unset($__componentOriginal1e817eb3c41fe3ea9eb0c15213c4b557); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $component = $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal40a3de7997c05e5562c4104d90e9b634 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal40a3de7997c05e5562c4104d90e9b634 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.separator','data' => ['class' => '-mt-5 -z-10']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::separator'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => '-mt-5 -z-10']); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $component = $__componentOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__componentOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.section-container','data' => ['class' => 'flex flex-col gap-8 pt-14']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::section-container'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'flex flex-col gap-8 pt-14']); ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginal92c1a431b4816bac5d5a20d0fc1238ab = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal92c1a431b4816bac5d5a20d0fc1238ab = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.trace','data' => ['exception' => $exception]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::trace'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['exception' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception)]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal92c1a431b4816bac5d5a20d0fc1238ab)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal92c1a431b4816bac5d5a20d0fc1238ab; ?>
|
||||||
|
<?php unset($__attributesOriginal92c1a431b4816bac5d5a20d0fc1238ab); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal92c1a431b4816bac5d5a20d0fc1238ab)): ?>
|
||||||
|
<?php $component = $__componentOriginal92c1a431b4816bac5d5a20d0fc1238ab; ?>
|
||||||
|
<?php unset($__componentOriginal92c1a431b4816bac5d5a20d0fc1238ab); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginalb73d2d8821ad40718c243f895ec0c546 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginalb73d2d8821ad40718c243f895ec0c546 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.query','data' => ['queries' => $exception->applicationQueries()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::query'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['queries' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception->applicationQueries())]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginalb73d2d8821ad40718c243f895ec0c546)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginalb73d2d8821ad40718c243f895ec0c546; ?>
|
||||||
|
<?php unset($__attributesOriginalb73d2d8821ad40718c243f895ec0c546); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginalb73d2d8821ad40718c243f895ec0c546)): ?>
|
||||||
|
<?php $component = $__componentOriginalb73d2d8821ad40718c243f895ec0c546; ?>
|
||||||
|
<?php unset($__componentOriginalb73d2d8821ad40718c243f895ec0c546); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $component = $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal40a3de7997c05e5562c4104d90e9b634 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal40a3de7997c05e5562c4104d90e9b634 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.separator','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::separator'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes([]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $component = $__componentOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__componentOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.section-container','data' => ['class' => 'flex flex-col gap-12']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::section-container'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'flex flex-col gap-12']); ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginalcc330c991c1b19cde28fea414de1b6cb = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginalcc330c991c1b19cde28fea414de1b6cb = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.request-header','data' => ['headers' => $exception->requestHeaders()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::request-header'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['headers' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception->requestHeaders())]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginalcc330c991c1b19cde28fea414de1b6cb)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginalcc330c991c1b19cde28fea414de1b6cb; ?>
|
||||||
|
<?php unset($__attributesOriginalcc330c991c1b19cde28fea414de1b6cb); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginalcc330c991c1b19cde28fea414de1b6cb)): ?>
|
||||||
|
<?php $component = $__componentOriginalcc330c991c1b19cde28fea414de1b6cb; ?>
|
||||||
|
<?php unset($__componentOriginalcc330c991c1b19cde28fea414de1b6cb); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal3ce7d5064193f9b8bde76eb6792e715a = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal3ce7d5064193f9b8bde76eb6792e715a = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.request-body','data' => ['body' => $exception->requestBody()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::request-body'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['body' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception->requestBody())]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal3ce7d5064193f9b8bde76eb6792e715a)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal3ce7d5064193f9b8bde76eb6792e715a; ?>
|
||||||
|
<?php unset($__attributesOriginal3ce7d5064193f9b8bde76eb6792e715a); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal3ce7d5064193f9b8bde76eb6792e715a)): ?>
|
||||||
|
<?php $component = $__componentOriginal3ce7d5064193f9b8bde76eb6792e715a; ?>
|
||||||
|
<?php unset($__componentOriginal3ce7d5064193f9b8bde76eb6792e715a); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal40aab92597234e6686a03fbf91514afb = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal40aab92597234e6686a03fbf91514afb = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.routing','data' => ['routing' => $exception->applicationRouteContext()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::routing'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['routing' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception->applicationRouteContext())]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal40aab92597234e6686a03fbf91514afb)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal40aab92597234e6686a03fbf91514afb; ?>
|
||||||
|
<?php unset($__attributesOriginal40aab92597234e6686a03fbf91514afb); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal40aab92597234e6686a03fbf91514afb)): ?>
|
||||||
|
<?php $component = $__componentOriginal40aab92597234e6686a03fbf91514afb; ?>
|
||||||
|
<?php unset($__componentOriginal40aab92597234e6686a03fbf91514afb); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal982e77712eb0069b2ae32176000f422d = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal982e77712eb0069b2ae32176000f422d = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.routing-parameter','data' => ['routeParameters' => $exception->applicationRouteParametersContext()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::routing-parameter'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['routeParameters' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($exception->applicationRouteParametersContext())]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal982e77712eb0069b2ae32176000f422d)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal982e77712eb0069b2ae32176000f422d; ?>
|
||||||
|
<?php unset($__attributesOriginal982e77712eb0069b2ae32176000f422d); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal982e77712eb0069b2ae32176000f422d)): ?>
|
||||||
|
<?php $component = $__componentOriginal982e77712eb0069b2ae32176000f422d; ?>
|
||||||
|
<?php unset($__componentOriginal982e77712eb0069b2ae32176000f422d); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $component = $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal40a3de7997c05e5562c4104d90e9b634 = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal40a3de7997c05e5562c4104d90e9b634 = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.separator','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::separator'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes([]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__attributesOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal40a3de7997c05e5562c4104d90e9b634)): ?>
|
||||||
|
<?php $component = $__componentOriginal40a3de7997c05e5562c4104d90e9b634; ?>
|
||||||
|
<?php unset($__componentOriginal40a3de7997c05e5562c4104d90e9b634); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if (isset($component)) { $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.section-container','data' => ['class' => 'pb-0 sm:pb-0']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::section-container'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes(['class' => 'pb-0 sm:pb-0']); ?>
|
||||||
|
<?php if (isset($component)) { $__componentOriginal00da9961ee0aae6b56664f2b481f9f2e = $component; } ?>
|
||||||
|
<?php if (isset($attributes)) { $__attributesOriginal00da9961ee0aae6b56664f2b481f9f2e = $attributes; } ?>
|
||||||
|
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'laravel-exceptions-renderer::components.laravel-ascii-spotlight','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
|
||||||
|
<?php $component->withName('laravel-exceptions-renderer::laravel-ascii-spotlight'); ?>
|
||||||
|
<?php if ($component->shouldRender()): ?>
|
||||||
|
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
|
||||||
|
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
|
||||||
|
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php $component->withAttributes([]); ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal00da9961ee0aae6b56664f2b481f9f2e)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal00da9961ee0aae6b56664f2b481f9f2e; ?>
|
||||||
|
<?php unset($__attributesOriginal00da9961ee0aae6b56664f2b481f9f2e); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal00da9961ee0aae6b56664f2b481f9f2e)): ?>
|
||||||
|
<?php $component = $__componentOriginal00da9961ee0aae6b56664f2b481f9f2e; ?>
|
||||||
|
<?php unset($__componentOriginal00da9961ee0aae6b56664f2b481f9f2e); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__attributesOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b)): ?>
|
||||||
|
<?php $component = $__componentOriginal1e2fb8a385bff5b6574eeb687cee100b; ?>
|
||||||
|
<?php unset($__componentOriginal1e2fb8a385bff5b6574eeb687cee100b); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $__env->renderComponent(); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__attributesOriginalbbd4eeea836234825f7514ed20d2d52d)): ?>
|
||||||
|
<?php $attributes = $__attributesOriginalbbd4eeea836234825f7514ed20d2d52d; ?>
|
||||||
|
<?php unset($__attributesOriginalbbd4eeea836234825f7514ed20d2d52d); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if (isset($__componentOriginalbbd4eeea836234825f7514ed20d2d52d)): ?>
|
||||||
|
<?php $component = $__componentOriginalbbd4eeea836234825f7514ed20d2d52d; ?>
|
||||||
|
<?php unset($__componentOriginalbbd4eeea836234825f7514ed20d2d52d); ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/show.blade.php ENDPATH**/ ?>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg" <?php echo e($attributes); ?>>
|
||||||
|
<path d="M5.25 9L9.25 5L5.25 1" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M0.75 9L4.75 5L0.75 1" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/components/icons/chevrons-right.blade.php ENDPATH**/ ?>
|
||||||
|
After Width: | Height: | Size: 537 B |
@@ -0,0 +1,60 @@
|
|||||||
|
# <?php echo e($exception->class()); ?> - <?php echo $exception->title(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php echo $exception->message(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
PHP <?php echo e(PHP_VERSION); ?>
|
||||||
|
|
||||||
|
Laravel <?php echo e(app()->version()); ?>
|
||||||
|
|
||||||
|
<?php echo e($exception->request()->httpHost()); ?>
|
||||||
|
|
||||||
|
|
||||||
|
## Stack Trace
|
||||||
|
|
||||||
|
<?php $__currentLoopData = $exception->frames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
||||||
|
<?php echo e($index); ?> - <?php echo e($frame->file()); ?>:<?php echo e($frame->line()); ?>
|
||||||
|
|
||||||
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
||||||
|
|
||||||
|
## Request
|
||||||
|
|
||||||
|
<?php echo e($exception->request()->method()); ?> <?php echo e(\Illuminate\Support\Str::start($exception->request()->path(), '/')); ?>
|
||||||
|
|
||||||
|
|
||||||
|
## Headers
|
||||||
|
|
||||||
|
<?php $__empty_1 = true; $__currentLoopData = $exception->requestHeaders(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||||
|
* **<?php echo e($key); ?>**: <?php echo $value; ?>
|
||||||
|
|
||||||
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||||
|
No header data available.
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
## Route Context
|
||||||
|
|
||||||
|
<?php $__empty_1 = true; $__currentLoopData = $exception->applicationRouteContext(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||||
|
<?php echo e($name); ?>: <?php echo $value; ?>
|
||||||
|
|
||||||
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||||
|
No routing data available.
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
## Route Parameters
|
||||||
|
|
||||||
|
<?php if($routeParametersContext = $exception->applicationRouteParametersContext()): ?>
|
||||||
|
<?php echo $routeParametersContext; ?>
|
||||||
|
|
||||||
|
<?php else: ?>
|
||||||
|
No route parameter data available.
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
## Database Queries
|
||||||
|
|
||||||
|
<?php $__empty_1 = true; $__currentLoopData = $exception->applicationQueries(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as ['connectionName' => $connectionName, 'sql' => $sql, 'time' => $time]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
|
||||||
|
* <?php echo e($connectionName); ?> - <?php echo $sql; ?> (<?php echo e($time); ?> ms)
|
||||||
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
|
||||||
|
No database queries detected.
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php ENDPATH**/ ?>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user