i want create chat betwen user and producer ?
Hello, has anyone tried firebase SDK with Laravel?
Why did not save my faqs in table?
First of all did you create a custom request root model binding called FaqRequest?
Anyone tried Laravel vapor?
This is a simple Wrapper around the ZipArchive methods with some handy functions – GitHub – Chumper/Zipper: This is a simple Wrapper around the ZipArchive methods with some handy functions
I’ve created a Service provider following this guide, but at the end, it throws the error:
Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class IlluminateSupportServiceProvider
This happens when injectin the Service provider to the controller constructor
This article explains how to register an application in Google Cloud Firebase and integrate it in a Laravel application.



First of all did you create a custom request root model binding called FaqRequest?
Second you just need to instantiate using new Faq();
I want to run a schedule cron job on laravel 5.8, how do I get it done
<?php
namespace AppConsoleCommands;
use IlluminateConsoleCommand;
use AppSetting;
use AppTrade;
use IlluminateSupportFacadesDB;
class SamSchedule extends Command
{
/
* The name and signature of the console command.
*
* @var string
*/
protected $signature = ‘trade:bot’;
/
* The console command description.
*
* @var string
*/
protected $description = ‘Sam the auto trading bot’;
/
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$auto_trade = $setting->value(‘auto_trade’);
$acc_balance = $setting->value(‘auto_trade_acc_balance’);
$invested = $setting->value(‘auto_trade_invested_amount’);
$return_percent = $setting->value(‘auto_trade_return_percent’);
if($auto_trade == 1){
$accounts = DB::table(‘accounts’)->where(‘investment’,’>=’,$acc_balance)->whereIsActive(1)->get();
$profit = $invested*$return_percent/100;
foreach ($accounts as $account){
$type = ($this->type() == ‘+’) ? 1 : 0;
$return = ($type== 1) ? ‘balance + ‘.$profit : ‘balance – ‘.$invested;
$received = ($type == 1) ? $profit : 0-$invested;
DB::table(‘accounts’)->where(‘user_id’, ‘=’, $account->user_id)->update([‘balance’=>DB::raw(“$return”)]);
Trade::create([
‘user_id’ => $account->user_id,
‘investment’ => $invested,
‘received’ => $received,
‘type’ => $type,
‘entry’ => now()
]);
}
return “Auto Trading Complete”;
}
return “Auto Trading Could not run at this time”;
}
protected function type()
{
$type = mt_rand(0,1);
if($type == 1){
return ‘+’;
}
return ‘-‘;
}
}
<?php
namespace AppConsoleCommands;
use IlluminateConsoleCommand;
use AppSetting;
use AppTrade;
use IlluminateSupportFacadesDB;
class SamSchedule extends Command
{
/
* The name and signature of the console command.
*
* @var string
*/
protected $signature = ‘trade:bot’;
/
* The console command description.
*
* @var string
*/
protected $description = ‘Sam the auto trading bot’;
/
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$auto_trade = $setting->value(‘auto_trade’);
$acc_balance = $setting->value(‘auto_trade_acc_balance’);
$invested = $setting->value(‘auto_trade_invested_amount’);
$return_percent = $setting->value(‘auto_trade_return_percent’);
if($auto_trade == 1){
$accounts = DB::table(‘accounts’)->where(‘investment’,’>=’,$acc_balance)->whereIsActive(1)->get();
$profit = $invested*$return_percent/100;
foreach ($accounts as $account){
$type = ($this->type() == ‘+’) ? 1 : 0;
$return = ($type== 1) ? ‘balance + ‘.$profit : ‘balance – ‘.$invested;
$received = ($type == 1) ? $profit : 0-$invested;
DB::table(‘accounts’)->where(‘user_id’, ‘=’, $account->user_id)->update([‘balance’=>DB::raw(“$return”)]);
Trade::create([
‘user_id’ => $account->user_id,
‘investment’ => $invested,
‘received’ => $received,
‘type’ => $type,
‘entry’ => now()
]);
}
return “Auto Trading Complete”;
}
return “Auto Trading Could not run at this time”;
}
protected function type()
{
$type = mt_rand(0,1);
if($type == 1){
return ‘+’;
}
return ‘-‘;
}
}
And here is the output error:
[04-Sep-2019 13:58:01 UTC] PHP Fatal error: Cannot declare class AppConsoleCommandsSamSchedule, because the name is already in use in /home2/public_html/app/Console/Commands/Sam.php on line 82
Didn’t work either
class SamSchedule
in you text editor, to see if you declare it somewhere else.
class SamSchedule
in you text editor, to see if you declare it somewhere else.
Thanks, it has been fixed
O

{
$sales = DB::table(‘stocks’)->select(‘stock_id’)->get();
return view(‘sales.create’)->with(‘sales’,$sales);
}
I am using that create function to collect stock IDs from the database
{{Form::label(‘stock_id’, ‘Stock ID’)}}
@foreach($sales as $sale)
{{ Form::select(‘stock_id’,$sale ,[‘class’=> ‘form-control’, ‘placeholder’ => ‘Stock ID’])}}
@endforeach
</div>
This is how my create.blade.php looks like

I would like to suggest you to use ajax or vue which included into laravel!
Is shit
->where(function($query) use ($user, $sellerId){
$query->where(‘seller_phone’, $user->phone_number)
->orWhere(‘beneficiary_merchant_id’, $sellerId);
});

Hi guys can I do that