I want to encrypt the id in URL I’ll show my controller code and route. I’ve already used Crypt::encrypt($id); in my controller but it’s not working properly so I’ve commented that line in my controller this is my controller this is my route this is my blade Answer Use laravel builtin …
Tag: php
Callback function ignoring other validation rules and executes first
On the HTML form, I have a field such as:
Laravel: how to cache route for 5 minutes?
I want to cache one route in Laravel project and clear it for every 5 minutes. I searched a bunch of articles but only found artisan route:cache command and I have no idea if it possible to configure caching time. So, this is my routes routes/web.php: And every time when user loads rating page the getLeaders(…
php artisan serve command display error message
I am using php 7.3.2 on window 7. When I try to run php artisan serve, it shows this error on the webpage: Whoops, looks like something went wrong. Is it related to the message that I received …
How to access php from html?
I am sorry if this is a repeating question, but I can’t find anyone who might have the same question as me yet. I am new in html and php, and I am trying to learn more by practising, basically …
I want to convert pdf to text. but it gives me error. why spatie/pdf-to-text is showing error?
my code error message Fatal error: Uncaught SpatiePdfToTextExceptionsCouldNotExtractText: The command “”/usr/bin/pdftotext” simple.pdf -” failed. Exit Code: 1(General error) Working directory: C:xampphtdocspdf Output: ================ Error Output: ================ The system cannot fi…
PHP Curl – Received HTTP/0.9 when not allowed
I stumbled over a weird behavior when I try to send a post HTTP/2.0 request to apples push service: The exception is thrown with the Message: Curl failed: Received HTTP/0.9 when not allowed | 0 I explicitly told curl to use HTTP/2.0 on the second line of the code snipped above. Does anyone have any idea what …
SQL – Select doesn’t retrieve results
I’m using sqlsrv_num_rows in order to check if a user exists in the DB. When i’m running the query in my DB i’m getting 1 result, but in my PHP I’m not getting anything (echo doesn’t print anything). Why is that? Example query I’m using PHP and MSSQL. Answer Explanations: F…
HTML_TO_DOC() looping table from database
I was been in charge for a system that still using HTML_TO_DOC() with PHP. My question is, i want to display all data from database using table. Here is my coding example: $htmlContent=$html_2.’ &…
Method to change specific value inside multidimensional array
Given a class with a multidimensional array as private property. I’m trying to write a method setValue() which could change any value of this private array by passing: some kind of path to a specific value (e.g. $path = [‘lorem’ => [‘ipsum’ => [‘dolor’ => [&#…