Categories
PHP

Laravel 5: Action not defined

I searched a little on the internet, I found some topics that spoke about this, but none about my problem specifically. So my error: Action App\Http\Controllers\Users@index not defined. The controller Users: <?php namespace App\Http\Controllers; use Illuminate\Routing\UrlGenerator; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use Input; use App\Models\Users; use Session; use Validator; class Users extends Controller { protected $users; […]

Categories
PHP

Symfony 4, doctrine, getResult and getArrayResult and getScalarResult return same structure results

From symfony 4, I create a sample repository class. From this class, I created a method for get the list of all email’s users. I would like get a array structure like this : array( “email1”, “email2”, “email3”, … ) But with ‘getResult’ I get a multidimensional array. Then, I tested with getArrayResult and getScalarResult […]

Categories
PHP

Formating errors on Slack using spatie/laravel-slack-slash-command package Laravel 5.5

I am using a package spatie/laravel-slack-slash-command and the code below works fine except for this condition if the user inputs no argurment, there’s an error being caught because there’s a CatchAll.php class in the package, I would simply like to know how to format this error, thanks! This is how I would like to format […]

Categories
PHP

Drupal Website shows localhost error 500 after deployment

I have an already built drupal website which I am trying to deploy. I deployed it and it and run the mysql script for the DB. Now when I go to my website http:\localhost\mywebsite\install.php , it says site is already installed , click here to view your website, and when I click on that , […]

Categories
PHP

Take many elements by pluck Laravel?

public function getPackage($type) { $sale = Tour::where(‘id_package’,$type)->get(); $pack = Package::where(‘id’,$sale->pluck(‘id_package’))->get(); $loca = Location::where(‘id’,’=’,$sale->pluck(‘id_location’))->get(); return view(‘page.package’,compact(‘pack’,’loca’,’sale’)); } When i use dd($sale->pluck(‘id_location’), i can get two element but when I assign $loca to only one, and when I use whereIn(‘id’,$sale->pluck(‘id_location’) I can get two element but does not match the id tour @@ Thanks

Categories
PHP

can’t upload image to server godaddy

I’m sending a picture from the Android application to the server but tells me wrong path when I clear this line it works but does not add an image $path = “httpdocs/A-messages/stats/” . $imgname ; all codes <?php $con=new mysqli(“xxx”,”xxx”,”xxx”,”xxx”); $con->query(“SET NAMES utf8”); $con->query(“SET CHARACTER utf8”); $hey = $_POST[“hey1”]; $imgname = “img_beta.jpg”; $path = “httpdocs/A-messages/stats/” […]

Categories
PHP

AdSense for generator like page

pages like: http://ift.tt/2iUBMa7 http://ift.tt/mQzrvb Do not have any content at all but if i try to conect AdSense to my page: http://generujemy.pl/ I get email info like: “Insufficient content” I tried to find something on google forum but with no luck so far Any ideas what to do to add them to my page?

Categories
PHP

How to get friday dates between two time intervals

I would like to get all Friday dates from two-time intervals. My framework is laravel. my function: public function getFridaysInRange($dateFromString, $dateToString) { $dateFrom = new \DateTime($dateFromString); $dateTo = new \DateTime($dateToString); $dates = []; if ($dateFrom > $dateTo) { return $dates; } if (1 != $dateFrom->format(‘N’)) { $dateFrom->modify(‘next friday’); } while ($dateFrom <= $dateTo) { $dates[] […]

Categories
PHP

How retrieve payment detail using GetPaymentDetails method

i having strong problem to implement the GetPaymentDetail method for retrieve the payment done with paypal having the transaction_id. Can i ask to have just an example for understand how i can implement it? Thanks very much.

Categories
PHP

Joomla php echo meta robots tag in template?

I wonder if it’s possible to php echo the robots meta tag in a template in Joomla. For example, if I do something like this: $doc =JFactory::getDocument(); $meta_description = $doc->getMetaData(“description”); I can echo the meta description via <?php echo “$meta_description”; ?> Is this also somehow possible with the robots tag? Thanks in advance.