Skip to content
Advertisement

Tag: laravel

Laragon – pretty url for one app does not work

After enabling the auto virtual host I wanted to try pretty url for my current project. Problem is it first showed index of/ of the project and after trying some solutions it now shows “This site cannot be reached!” error. The pretty url feature wotks withother projects. What I tried: .restarting laragon and pc .enabeling nginx .renaming the project .clearing

How to decode in php?

Can anyone help me to decode in human readable form? I got the file Obfuscated by YAK Pro. Unable to understand what nAbP2 term is. Please guide me thanks. Answer nAbP2 is a label. In the third line of the posted code you can find the goto statement. It jumps to the respective label. It means that it will continue

Laravel:8.x Target class [ArticlesController] does not exist [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question Hello my code is giving me this error: “Target class [ArticlesController] does not exist.” i tried to uncomment “protected $namespace = ‘AppHttpControllers’;” in RouteServiceProvider then it

Laravel how to mock SoapClient response for custom validation rule

Having a custom validation rule that uses the SoapClient I now need to mock it in tests. Used to use laminas-soap package but it doesn’t support PHP8. With laminas-soap it was possible to do But that doesn’t work with SoapClient::class. Then tried from Phpunit, mocking SoapClient is problematic (mock magic methods) but also failed: Tried from mock SoapClient response from

Laravel pass collection to view

I’m trying to pass a collection to the view but I’m not getting anything. The page renders blank In the blade I have The result is Error: Trying to get property ‘anything’ of non-object From what I found this should work, please let me know what I`m doing wrong Thanks for your help Answer You forgot to add the ->get()

How to check array of data to where condition in laravel?

I have a book[] input field that comes from the view the dd result is like I want to select data from the library table where book_id match whit the above array, I wrote the below query but it gives an error like: Type error: Argument 1 passed to IlluminateDatabaseGrammar::parameterize() must be of the type array, string given, called in

pagination data with laravel 5.8

I´m traying to paginate my results of query, but i have a problem with this. I have this code in my controller: and in my view: but i have one error when render blade: i did a print_r and this it´s result: so that, i can show my post in my blog page, but when render blade i can´t show

How to insert data from one table to another in laravel?

I have two tables, visitors and in. visitors contains columns, Name, Number, Purpose, and Datetime. in contains Name, Number, and InTime. I want to fetch all the values from the visitors table into in. I have tried copying the data from visitors to in, however, if I add new rows into the visitors table, those new rows won’t be reflected

Advertisement