The Clean Architecture in php



Download 2,26 Mb.
Pdf ko'rish
bet178/179
Sana24.06.2021
Hajmi2,26 Mb.
#100337
1   ...   171   172   173   174   175   176   177   178   179
Bog'liq
The-Clean-Architecture-in-PHP-Kristopher-Wilson

Order Management
Let’s keep rolling right into Orders. Again, we’ll start by defining our routes, which are taken
and adapted from our ZF2 application:
⁶⁶
https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29


Switching to Laravel
227
// app/Http/routes.php
// ...
Route
::
get
(
'/orders'
,
'OrdersController@indexAction'
);
Route
::
match
([
'get'
,
'post'
],
'/orders/new'
,
'OrdersController@newAction'
);
Route
::
get
(
'/orders/view/{id}'
,
'OrdersController@viewAction'
);
We’ll start with our
indexAction()
.
Listing Orders
Let’s create our
OrdersController
with its
indexAction()
:
// app/Http/Controllers/OrdersController.php
namespace
App\Http\Controllers;
use
CleanPhp\Invoicer\Domain\Repository\CustomerRepositoryInterface;
use
CleanPhp\Invoicer\Domain\Repository\OrderRepositoryInterface;
use
CleanPhp\Invoicer\Persistence\Hydrator\OrderHydrator;
use
CleanPhp\Invoicer\Service\InputFilter\OrderInputFilter;
class
OrdersController

Download 2,26 Mb.

Do'stlaringiz bilan baham:
1   ...   171   172   173   174   175   176   177   178   179




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish