diff --git a/Chapter03/onlineStore/.editorconfig b/.editorconfig similarity index 100% rename from Chapter03/onlineStore/.editorconfig rename to .editorconfig diff --git a/Chapter07/onlineStore/.env.example b/.env.example similarity index 95% rename from Chapter07/onlineStore/.env.example rename to .env.example index 8510237..df17b03 100644 --- a/Chapter07/onlineStore/.env.example +++ b/.env.example @@ -10,8 +10,8 @@ LOG_LEVEL=debug DB_CONNECTION=mysql DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=laravel +DB_PORT=3307 +DB_DATABASE=onlineStore DB_USERNAME=root DB_PASSWORD= diff --git a/Chapter03/onlineStore/.gitattributes b/.gitattributes similarity index 100% rename from Chapter03/onlineStore/.gitattributes rename to .gitattributes diff --git a/Chapter03/onlineStore/.gitignore b/.gitignore similarity index 100% rename from Chapter03/onlineStore/.gitignore rename to .gitignore diff --git a/Chapter03/onlineStore/.styleci.yml b/.styleci.yml similarity index 100% rename from Chapter03/onlineStore/.styleci.yml rename to .styleci.yml diff --git a/BookImages/Book images.pdf b/BookImages/Book images.pdf deleted file mode 100644 index 475bdd2..0000000 Binary files a/BookImages/Book images.pdf and /dev/null differ diff --git a/Chapter03/onlineStore/.env.example b/Chapter03/onlineStore/.env.example deleted file mode 100644 index 8510237..0000000 --- a/Chapter03/onlineStore/.env.example +++ /dev/null @@ -1,52 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack -LOG_DEPRECATIONS_CHANNEL=null -LOG_LEVEL=debug - -DB_CONNECTION=mysql -DB_HOST=127.0.0.1 -DB_PORT=3306 -DB_DATABASE=laravel -DB_USERNAME=root -DB_PASSWORD= - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -FILESYSTEM_DISK=local -QUEUE_CONNECTION=sync -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -MEMCACHED_HOST=127.0.0.1 - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_MAILER=smtp -MAIL_HOST=mailhog -MAIL_PORT=1025 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS=null -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 - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/Chapter03/onlineStore/README.md b/Chapter03/onlineStore/README.md deleted file mode 100644 index f171eca..0000000 --- a/Chapter03/onlineStore/README.md +++ /dev/null @@ -1,64 +0,0 @@ -
- - - -## 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. - -If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. - -## 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 [Patreon page](https://patreon.com/taylorotwell). - -### Premium Partners - -- **[Vehikl](https://vehikl.com/)** -- **[Tighten Co.](https://tighten.co)** -- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** -- **[64 Robots](https://64robots.com)** -- **[Cubet Techno Labs](https://cubettech.com)** -- **[Cyber-Duck](https://cyber-duck.co.uk)** -- **[Many](https://www.many.co.uk)** -- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)** -- **[DevSquad](https://devsquad.com)** -- **[Curotec](https://www.curotec.com/services/technologies/laravel/)** -- **[OP.GG](https://op.gg)** -- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)** -- **[Lendio](https://lendio.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). diff --git a/Chapter03/onlineStore/app/Http/Kernel.php b/Chapter03/onlineStore/app/Http/Kernel.php deleted file mode 100644 index d3722c2..0000000 --- a/Chapter03/onlineStore/app/Http/Kernel.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ - protected $middleware = [ - // \App\Http\Middleware\TrustHosts::class, - \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, - \App\Http\Middleware\PreventRequestsDuringMaintenance::class, - \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, - \App\Http\Middleware\TrimStrings::class, - \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, - ]; - - /** - * The application's route middleware groups. - * - * @var array{{ $description }}
-{{ $author }}
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]["description"] }}
-Add to Cart
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]["description"] }}
-Add to Cart
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]["description"] }}
-Add to Cart
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]["description"] }}
-Add to Cart
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -Edit | -Delete | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -Edit | -Delete | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -Edit | -Delete | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
-Add to Cart
-ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
ID | -Name | -Price | -Quantity | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -${{ $product->getPrice() }} | -{{ session('products')[$product->getId()] }} | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
--
- -ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
ID | -Name | -Price | -Quantity | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -${{ $product->getPrice() }} | -{{ session('products')[$product->getId()] }} | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
--
- -ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
--
- -ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -- - - - | -- - | -
ID | -Name | -Price | -Quantity | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -${{ $product->getPrice() }} | -{{ session('products')[$product->getId()] }} | -
{{ $viewData["description"] }}
-{{ $viewData["author"] }}
-{{ $viewData["product"]->getDescription() }}
--
- -Nom | +Type | +Taux | +Période | +Appliqué à | +Statut | +Actions | +
---|---|---|---|---|---|---|
{{ $discount->name }} | ++ @if($discount->type == 'global') + Tous les produits + @elseif($discount->type == 'category') + Catégorie + @else + Produit + @endif + | +{{ $discount->rate }}% | ++ Du {{ $discount->start_date->format('d/m/Y') }} + au {{ $discount->end_date->format('d/m/Y') }} + | ++ @if($discount->type == 'global') + Tous les produits + @elseif($discount->type == 'category') + {{ $discount->category->name ?? 'N/A' }} + @else + {{ $discount->product->name ?? 'N/A' }} + @endif + | ++ @if($discount->isActive()) + Actif + @else + Inactif + @endif + | ++ Modifier + + | +
Welcome to the Admin Panel, use the sidebar to navigate between the different options.
+ +# | +Name | +Price | +Category | +Quantity | +Fournisseur | +Action | +
---|---|---|---|---|---|---|
{{ $product->id }} | +{{ $product->name }} | +{{ $product->price }} $ | +{{ optional($product->categorie)->name ?: 'No category' }} | +{{ $product->quantity_store }} | +{{ optional($product->fournisseur)->raison ?: 'No fournisseur' }} | ++ Modifier + | +
ID | -Name | -Edit | -Delete | -
---|---|---|---|
{{ $product->getId() }} | -{{ $product->getName() }} | -Edit | -Delete | -
+ Quantity in stock: {{ $product->getQuantityStore() }} +
+ @if ($product->getQuantityStore() == 0) +Out of stock
+ @endif +{{ $viewData['product']->description }}
+Quantity in stock : {{ $viewData['product']->getQuantityStore() }}
+ + + +