Skip to content

Tag: laravel

OctoberCMS. How to pass variable from page to component?

I have defined a variable in a page: and I want to pass this variable to a component: but this method does not work. How can I do that? Answer I am guessing that you need to pass builderDetails.record to your component ‘Variations’ and then you want to access that variables inside component &#8216…

Proxy pass image Laravel

I’m trying to Proxy serve an HTTP image in my HTTPS site I heard that I can do a proxy serve of this file in one of my endpoint and render it in my site instead of displaying the actual file url. …

How to do filter for products (laravel)

I do the online shop. I have 3 pages where filters for products are similar – Catalog page, parent category page and children category page The filter is made via get requests, like that: site/catalog?price_from=1&price_to=9999&color=red. How to make this filter into a separate function? Will it…

Using logical or in seeInDatabase

How can I implement a logic ‘or’ operator in Codeception’s seeInDatabase method?. For example: the methods syntax is Which generates this query How can I generate the following query? Answer you can try this- Or You can do this split into some simple steps. First get the records- then test- …

Displaying date portion of timestamp in laravel field

I have a table data value in my laravel blade: which just reads from a database timestamp value. It works and displays as it should but the controller is reading the full timestamp, which we need, but in this table data cell I only want to display the date portion. So instead of 2017-12-27-00:00:00, I just wa…

Laravel submitting form gets page expired

So i have a very basic controller located at : app/Http/Controllers/RentalRequestController Then in my web.php i have the following: And then i have the following form in my view: Now when i submit the form it redirects me to a page saying: Can anyone tell me what ive done wrong? Answer You should add: inside…

How to load a nested relationship in Laravel

I have a model called CallbackRequest the model has a relationship with Loan model and that is the only relationship for CallbackRequest model. CallbackModel: Now Loan model itself has a relationship with a third model called Applicant. Loan Model: My point: When I load CallbackRequest I eagerload loan model …