Data dodania Pytanie
2017-06-16 15:06 How to use class constants in @Security annotation using the Symfony Expression Language? »
I am using Symfony 3 and I've created a custom Voter class. I want to access it using the SensioFrameworkExtraBundle @Security tag. It kind of works...
(1) odpowiedzi
2017-06-16 15:06 one route 2 controllers - Laravel »
I have a route, based on the term i need to call the appropriate controller. for e.g Route::get('/{term}','Usercontroller') Route::get('/{term}','br...
(1) odpowiedzi
2017-06-16 15:06 PHP - Use preg_replace to change a colour of word after a specific character »
I currently have preg-replace in place to change the colours of words that display in a div. however at the moment it is simply just text matches. ...
(1) odpowiedzi
2017-06-16 01:06 Query HasManyThrough Laravel relation retrieving related records »
Considering the basic example Has Many Through relationship in the Laravel guide, I'm trying to query directly with eloquent, countries with posts fro...
(2) odpowiedzi
2017-06-16 01:06 laravel query a collection that's been called pior »
I have this code below to get all the rating information for a model as you can see there are quite a lot of queries going on just for the rating info...
(3) odpowiedzi
2017-06-15 16:06 .php-fpm-bin 100% CPU usage. How to track the exact script causing it? »
I'm hosting a wordpress blog and since 5th of June, I've been having a 100% CPU load (up from 5%), hosted on AWS. Now, I've added many plugins, mai...
(2) odpowiedzi
2017-06-15 16:06 How to show keys instead values of an associative array on Laravel »
I´m new on Laravel and I´m trying to display on a select the keys instead the values of an associative array... Could you help me? The array I´m ...
(4) odpowiedzi
2017-06-15 12:06 MySql - Get Min, Max, and 3 random Rows »
I want a MySql query to get 5 rows which include min price row, max price row and other 3 random row. Table: ID Product Price 1 data 2 2 dat...
(6) odpowiedzi
2017-06-15 12:06 How to configure wordpress application in subdirectory with simple php application using .htaccess / Apache2? »
I want to configure a Wordpress application with a simple php application. The directory structure of the application is as follow : Root directory :...
(1) odpowiedzi
2017-06-15 12:06 Laravel redirect route is not working using return but if i use echo its working why? »
Hi guys i got this weird experience with laravel redirect->route('routeName'); here is the code public static function loginCheckWithRedirect($routeN...
(2) odpowiedzi
2017-06-15 11:06 How to access ACF fields for a custom post type using 'wpdb'? »
I have two WordPress installs, one is to be used as an intranet and the other is public. I need to pull in the data for a custom post type from the pu...
(2) odpowiedzi
2017-06-15 10:06 How can I get image from different project on the laravel? »
I have two project or url First url like this : http://myshop.dev/ Second url like this : http://backend.myshop.dev/ If the second url, I run th...
(3) odpowiedzi
2017-06-15 09:06 SilverStripe sort by has_one relation field "title" »
I have two objects Schedule and LocationPage. Object Schedule has a $has_one relation to LocationPage: class Schedule extends DataObject { priva...
(0) odpowiedzi
2017-06-15 09:06 Search multiple array value and count the search result »
I have a bunch of array data from $search and $data variable like this: $data = array( array(1, 2, 3), array(1, 2, 3, 4, 7, 13) ); $search =...
(3) odpowiedzi
2017-06-15 09:06 Testing PUT in symfony 'php://input' empty »
In symfony project I have a PUT method and I try to read data like this: $data = file_get_contents('php://input'); When I use Postman it works, the...
(1) odpowiedzi
2017-06-15 00:06 Laravel: Cookie disappears on refresh: Instead, XSRF-TOKEN is created wrongly »
What I've been trying is to set a token (i.e. a string) as a cookie, which needs to persist for a certain period. public function tokenAuth(Request $...
(0) odpowiedzi
2017-06-14 14:06 How to display wordpress first post different from the others? »
First part of index.php, which currently have big post display contains these entries: <?php get_header(); ?> <!-- Begin Content --> <...
(2) odpowiedzi
2017-06-14 11:06 Get posts from each category once inside a section tag with category as id »
$args = array( 'type' => 'post', 'child_of' => 0, 'parent' => '', 'orde...
(0) odpowiedzi
2017-06-14 11:06 Update data into table from dynamically created input field »
I have 2 models Tour.php public function Itinerary() { return $this->hasMany('App\Itinerary', 'tour_id'); } and Itinerary.php public funct...
(2) odpowiedzi
2017-06-14 09:06 calculating number of months and generate tickets on each month »
I am trying to generate support request automatically on the basis of user entered start date and end date. 1st I will calculate the number of months...
(2) odpowiedzi
2017-06-14 08:06 Passing Form Field Data Only If Data Is Entered In Another Field In Same Form »
I have a 'Phone Number' field in my web form. I also have a 'hidden' form field which contains a unicode phone icon [&#9742]. Entering a phone n...
(4) odpowiedzi
2017-06-14 08:06 Laravel how to return a whole item data with the highest value »
How can I return the whole item data, I've used max to get the hieghest value but it only returns the value of the field not the whole item public st...
(4) odpowiedzi
2017-06-14 08:06 multidimensional array store each list array inside another array »
I have nested multidimensional arrays that may be 2 or 3 levels deep. Inside it I may or may not have list arrray. I need to loop over the array: Arr...
(2) odpowiedzi
2017-06-14 08:06 .htacess RewriteRule for category/page in custom CMS »
I have a working RewriteRule that rewrites any page to the literal url: RewriteRule ^(.+)$ index.php?page=$1 [QSA,L] The problem is I want to add p...
(5) odpowiedzi
2017-06-14 03:06 Laravel how to add new field in query result »
How can I add new field in each item, I have used put() but it only add on the last item. return self::where('latest', 1) ->where('com...
(1) odpowiedzi
2017-06-13 18:06 Laravel 5 - No relations showing for belongsTo »
Its been a while since I have worked on a Laravel project and cannot see why this issue is happening. I have a 'vehicles' table and also a 'customers...
(2) odpowiedzi
2017-06-13 17:06 `expect_any_instance_of` equivalent for PHPUnit »
I am a rails programmer exploring PHP and PHPUnit. I've been struggling a bit with switching over from RSpec to PHPUnit. More specifically RSpec has...
(1) odpowiedzi
2017-06-13 15:06 Displaying php result in HTML using AJAX »
I am trying to display the result of my php in different <div>-s. My plan is that I make a query in my php and display the result in JSON format...
(3) odpowiedzi
2017-06-13 15:06 Create Dynamic Repeater Meta box for WordPress »
I have a custom post type Invoice . i want to create Repeater Metabox. Fields of Repter Metabox:- Invoice Item Invoice Price I want to get the In...
(1) odpowiedzi
2017-06-13 12:06 set dateTime format and soapclient error »
I need to set a dateTime in this specific date format: 2016-10-19T11:06:20.000+00:00 So I found that this one work: 'date'=> $dateStart->...
(1) odpowiedzi
2017-06-13 10:06 AJAX data not passing to PHP »
I am having trouble passing AJAX data to PHP. I am experienced with PHP but new to JavaScript. HTML / JavaScript <input type="text" id="commodity...
(2) odpowiedzi
2017-06-13 09:06 Mysql To MongoDb design Issue »
I am planning to move my mysql db of chat_latest and chat_messages to mongodb. Old Mysql tables: chat_latest: User1 User2 LatestState 1 2 ...
(0) odpowiedzi
2017-06-13 09:06 (Docker) Getting error: docker-php-source: no such file or directory when building docker file »
When I'm trying to build the docker file at: https://github.com/docker-library/php/blob/3f43309a0d5a427f54dc885e0812068ee767c03e/7.1/Dockerfile comma...
(1) odpowiedzi
2017-06-13 09:06 Is it fine to use pure PhP/MySql queries in Wordpress? »
Wordpress uses it's own version of php and queries data in its own way. Would it be a bad technique to use WP with pure mySQL commands like "SELECT * ...
(3) odpowiedzi
2017-06-13 08:06 CSRF Verification Failed. When Using CURL (divar) »
i'm trying to get content of divar.com by curl but error "CSRF verification failed. Request aborted." browser request Accept:application/json, text/...
(2) odpowiedzi