I am working with codeigniter / SQL. Where I want to insert unicode string with ‘N’ Prefix the insert. How can I achieve it in regular insert. Regular Code: INSERT Trying to Achieve: Is there any way to achive the above insert instead of manually writing the Query.? Answer This is the simplest way…
How to shutdown default PHP server “php -S”
I can start the default PHP server with php -S localhost:8000 but how to stop the server? Usually with CTRL + C yes, but if i want to do it from another terminal?
Export PHP interface to Typescript interface, or vice versa?
I’m experimenting with Typescript, and at my current contract I code backend in PHP. In a couple of projects I’ve written Typescript interfaces for the sort of AJAX responses my back end code gives …
Laravel 5 Send Errors to Email
I am trying to figure out how I can send errors to my email in Laravel 5. I haven’t had much luck finding any good resources. There used to be good packages like: https://github.com/TheMonkeys/laravel-error-emailer That did this for you in Laravel 4. They have yet to release a Laravel5 update because of…
Get request domain using php
I have problem with getting domain name using HTTP_REFERER. The condition is like this: http://www.example.com send a curl post to my server. The things is, example.com does not send their url in curl_setopt(CURLOPT_REFERER). So is it possible on my server side to get their domain name ? Thanks a lot for help…
Yii2 – how to set main config param pagination pageSizeLimit?
I want set main config param pageSizeLimit in class Pagination. Example: (/backend/config/main.php) ‘pagination’ => [ ‘class’ => ‘yiidataPagination’, [ ‘…
Laravel – Form validation error – argument 2 must be array
I’m working with Laravel and every time I submit my form it gives me this error: ErrorException in Factory.php line 91: Argument 2 passed to IlluminateValidationFactory::make() must be of the type array, null given, called in /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.p…
Issues creating / setting up Laravel Project (Laravel Newbie)
I’ve started playing around with Laravel and have run into problems almost immediately and wondered if anyone had the same issues. I’ve installed composer and tried setting up a new laravel project using composer create-project laravel/laravel –prefer-dist It looks like it starts to work the…
Netbeans PHPDoc local variable not working
I am trying to document my code more often and now I’m writing a class and want it to be fully documented. However, for some strange reason, local variable documentation (with PHPDoc of course) doesn’t work.. I got this: So when I type ‘the’ and press space, and go to my function in Ne…
heroku local does not find pdo_postgres driver
I am trying to use heroku local on mac to run a Symfony project. But unfortunately it does not find the postgresql driver… which is found when I run php app/console server:run Here is the resulting output. How can I solve this? Answer Did you see these ? http://www.somacon.com/p520.php http://www.unixme…