بحسب التوثيق الرسمي تستخدم الطريقة لالغاء دالة البناء وتمرير أو حقن المعاملات الي العروض والغاء التلميح hinting .
If for whatever reason, this automatic behavior doesn't work well for you, you can intercept parameters using the mount() method:
In Livewire components, you use mount() instead of a class constructor __construct() like you may be used to. NB: mount() is only ever called when the component is first mounted and will not be called again even when the component is refreshed or rerendered.
Like a controller, you can inject dependencies by adding type-hinted parameters before passed-in ones.
الأن بداخل المشروع الذي أنفذة باستخدام نفس الطريقة لتمرير معامل id للمنتج والكوبون يحدث لدي الخطأ التالي :
السؤال
محمود سامي7
سؤال بخصوص طريقة livewire mount () method ؟
بحسب التوثيق الرسمي تستخدم الطريقة لالغاء دالة البناء وتمرير أو حقن المعاملات الي العروض والغاء التلميح hinting .
الأن بداخل المشروع الذي أنفذة باستخدام نفس الطريقة لتمرير معامل id للمنتج والكوبون يحدث لدي الخطأ التالي :
Missing required parameter for [Route: admin.editcoupons] [URI: admin/coupon/edit/{coupon_id}] [Missing parameter: coupon_id]. (View: F:\xampp\htdocs\mshmk_shop\resources\views\livewire\admin\admin-coupons-component.blade.php)
تم التعديل في بواسطة Hassan Hedrتنسيق الخرج
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.