Skip to content

Tag: php

using SncRedisBundle on platform.sh

I’m trying to get my app hosted by platform.sh, my problem is that I use SncRedisBundle, with this config: When I push to platform.sh, their build process include a call to composer update, which end like this: Generating optimized autoload files > IncenteevParameterHandlerScriptHandler::buildParamet…

Laravel – unsigned with nullable

I am using Laravel 5.3, I want to define a field in table migration as nullable as well as unsigned. As both are index modifier, can I use them in concatenation ? Like: Please also give some reference if there is to these kind of modifications in laravel documentation or somewhere. Please note that I want to …

PHP date_sunrise and date_sun_info giving different results

I have a webcam website and I wanted to display the sunrise time for the actual day. So I used the date_sunrise function in PHP for this purpose. In addition to the coordinates, it takes the suns zenith value as input. I learned that the correct zenith for sunrise is 90.8333. 90 would be the theoretic angle t…

Detect emoticons in string

I found that you need PHP 7 and MySQL 5.5 to use emoticons in a string that you want to upload to the database. I don’t have these specification on my server so I want to give an error message in laravel or php. Is there a way to detect emoticons in php? If so then I can create a

Laravel casts with relation

I’m making a survey website where users provide answers from 0 to 10. I was experimenting with the casts to store all questions and the answer in 1 row. This is what the scores field looks like in the database This is as expected. The “5” and “6” are ID’s of the question an…