Can i create freah copy of laravel offline if i install the laravel installer?
Are u trying to run laravel offline?
How is the recommended way to handle database changes in environments like development and production for example?
ok, so I can seed real data and I just need to read things more carefully?
something like that?
Are u trying to run laravel offline??
namespace AppHttpControllers;
use AppGeneralSetting;
use AppUserWallet;
use CarbonCarbon;
use AppInvest;
use AppTrx;
use AppUser;
use IlluminateSupportFacadesRequest;
class CronController extends Controller
{
public function cron()
{
$now = Carbon::now();
$invest = Invest::whereStatus(1)->where(‘next_time’,'<=’,$now)->get();
$gnl = GeneralSetting::first();
foreach ($invest as $data)
{
$user = User::find($data->user_id);
$userInterestWallet = UserWallet::where(‘user_id’,$data->user_id)->where(‘type’,’interest_wallet’)->first();
$next_time = Carbon::parse($now)->addHours($data->hours);
$in = Invest::find($data->id);
$in->return_rec_time = $data->return_rec_time + 1;
$in->next_time = $next_time;
$in->last_time = $now;
if ($data->period == ‘-1’)
{
$in->status = 1;
$in->save();
$new_balance = formatter_money($userInterestWallet->balance + $data->interest);
$userInterestWallet->balance = $new_balance;
Trx::create([
‘user_id’ => $user->id,
‘amount’ => $data->interest,
‘main_amo’ => $new_balance,
‘charge’ => 0,
‘type’ => ‘+’,
‘remark’ => ‘interest’,
‘title’ => ‘Interest Return ‘.$data->interest.’ ‘.$gnl->cur_text.’ Added on Your ‘.str_replace(‘_’, ‘ ‘, $userInterestWallet->type).’ Balance’,
‘trx’ => getTrx(),
]);
if($gnl->invest_return_commission == 1){
$commissionType = formatter_money($data->interest) . ‘ ‘.$gnl->cur_text. ‘ Interest Commission’;
levelCommision($user->id, $data->interest, $commissionType);
}
}else{
if ($data->capital_status == 1)
{
if ($in->return_rec_time >= $data->period){
$bonus = $data->interest + $data->amount;
$new_balance = formatter_money($userInterestWallet->balance + $bonus);
$userInterestWallet->balance = $new_balance;
$in->status = 0;
}else{
$bonus = 0;
$new_balance = formatter_money($userInterestWallet->balance + $data->interest);
$userInterestWallet->balance = $new_balance;
$in->status = 1;
}
$in->save();
if ($bonus != 0){
Trx::create([
‘user_id’ => $user->id,
‘amount’ => $data->interest,
‘main_amo’ => $new_balance,
‘charge’ => 0,
‘type’ => ‘+’,
‘remark’ => ‘interest’,
‘title’ => ‘Interest Return ‘.$data->interest.’ ‘.$gnl->cur_text.’ Added on Your ‘.str_replace(‘_’, ‘ ‘, $userInterestWallet->type).’ Balance’,
‘trx’ => getTrx(),
]);
if($gnl->invest_return_commission == 1){
$commissionType = formatter_money($data->interest) . ‘ ‘.$gnl->cur_text. ‘ Interest Commission’;
levelCommision($user->id, $data->interest, $commissionType);
}
}else{
Trx::create([
‘user_id’ => $user->id,
‘amount’ => $data->interest,
‘main_amo’ => $new_balance,
‘charge’ => 0,
‘type’ => ‘+’,
‘remark’ => ‘interest’,
‘title’ => ‘Interest & Capital Return ‘.$bonus.’ ‘.$gnl->cur_text.’ Added on Your ‘.str_replace(‘_’, ‘ ‘, $userInterestWallet->type).’ Wallet’,
‘trx’ => getTrx(),
]);
if($gnl->invest_return_commission == 1){
$commissionType = formatter_money($data->interest) . ‘ ‘.$gnl->cur_text. ‘ Interest Commission’;
levelCommision($user->id, $data->interest, $commissionType);
}
}
}else{
if ($in->return_rec_time >= $data->period){
$in->status = 0;
}else{
$in->status = 1;
}
$in->save();
$new_balance = formatter_money($userInterestWallet->balance + $data->interest);
$userInterestWallet->balance = $new_balance;
$userInterestWallet->save();
Trx::create([
‘user_id’ => $user->id,
‘amount’ => $data->interest,
‘main_amo’ => $new_balance,
‘charge’ => 0,
‘type’ => ‘+’,
‘remark’ => ‘interest’,
‘title’ => ‘Interest Return ‘.$data->interest.’ ‘.$gnl->cur_text.’ Added on Your ‘.str_replace(‘_’, ‘ ‘, $userInterestWallet->type).’ Wallet’,
‘trx’ => getTrx(),
]);
if($gnl->invest_return_commission == 1){
$commissionType = formatter_money($data->interest) . ‘ ‘.$gnl->cur_text. ‘ Interest Commission’;
levelCommision($user->id, $data->interest, $commissionType);
}
}
}
}
}
}
Guys … is this enough secure to protect Vue page?
There is no user model
You delete it
You delete it
I have solved it
I start the work now i want to share may pages with her but i dont know what pages i send to her
I don’t really get you, but, for example when i work i first make the general layout, and define it there will be a theme for the front pages (those that don’t require login) and admin page (those that require login), them i make a standard for Index, edit and create pages, there is also the home page and errors (404,500,etc).
helpππ
CryptoTab Browser is the worldβs first web browser with built-in mining features. Familiar Chrome user interface is perfectly combined with extremely fast mining speed. Mine and browse at the same time!
jwt auth
Seller register
Seller create discount coupon/remove coupon
Seller add product
Payment gateway ccavenue
After sale admin cut commission and rest amount go to seller account
User dashboard
User add money etc etc
Yes
I wanted to create fresh projects many times over and over
I’m deploying my first laravel project with a voyager cms and everything is going very neat, this FW is awesome. I have a question tho:
How is the recommended way to handle database changes in environments like development and production for example?
Using a CMS add’s some things in the database that need to be populated in the production server in order to everything works fine, I use the migrations for structure, but I see no recommendations to handle the actual data part of the problem.
I think it’s like the seeders, but I need the matching data, not random data.
for example, my CMS menu is handled in the database.

Example
So, in this scenario I’ll have a model where I put my database changes, I update it manually and run it on the deploy process?
something like that?