How best can I achieve this?

|
Somewherewithmahim 2021-11-25 09:48:25
How
gharakeshishyan 2021-11-25 10:32:40
Hello all!
input name is array( name=”resource[title][]”). How i can show old value?<input type=”text” name=”resource[title][]” class=”form-control” placeholder=”Resource Title” value=”{{old()}}” required=”required”>
MOHAMMAD EISA 2021-11-25 10:38:32
Hello, please help me finding this issue. My Xampp MySQL is not starting and shows this error (Error: MySQL shutdown unexpectedly.
12:33:27 PM [mysql] This may be due to a blocked port, missing dependencies,
12:33:27 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:33:27 PM [mysql] Press the Logs button to view error logs and check
12:33:27 PM [mysql] the Windows Event Viewer for more clues
12:33:27 PM [mysql] If you need more help, copy and post this
12:33:27 PM [mysql] entire log window on the forums)
Dev_Mo_Ali 2021-11-25 10:45:12
MOHAMMAD EISA 2021-11-25 10:38:32
Hello, please help me finding this issue. My Xampp MySQL is not starting and shows this error (Error: MySQL shutdown unexpectedly.
12:33:27 PM [mysql] This may be due to a blocked port, missing dependencies,
12:33:27 PM [mysql] improper privileges, a crash, or a shutdown by another method.
12:33:27 PM [mysql] Press the Logs button to view error logs and check
12:33:27 PM [mysql] the Windows Event Viewer for more clues
12:33:27 PM [mysql] If you need more help, copy and post this
12:33:27 PM [mysql] entire log window on the forums)

Rename the folder mysql/data to mysql/data_old (you can use any name)
Create a new folder mysql/data
Copy the content that resides in mysql/backup to the new mysql/data folder
Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
Start MySQL from XAMPP control panel

Dev_Mo_Ali 2021-11-25 10:45:28
Do these steps
MOHAMMAD EISA 2021-11-25 10:45:37
Okay thanks
Alitech22 2021-11-25 13:21:27
Hello friend I need a fetch data from SQL in laravel on 4 levels but my code not support code give me online 1st level users I am creating MLM system I have two colum one is I’d and second in ref_by and I want fetch tree on 4 levels can anyone help me
Alitech22 2021-11-25 13:22:16
laravel_discuss-100634.jpg

Alitech22 2021-11-25 13:24:27
public function referredUsers(){
$page_title = “Referred Users”;
// $refUsers = User::where(‘ref_by’,auth()->user()->id)->with(‘plan’)->paginate(getPaginate());
// $commissions = CommissionLog::where(‘user_id’,auth()->user()->id)->with(‘userFrom’)->paginate(getPaginate());
$levels = Referral::get();
$user = auth()->user();
$usr=$user->id;
$i=1;
$commissions=[];
$refUsers=[];
while($usr!=”” || $usr!=”0″ || $i=”0″ ) {

$refer= AppUser::where(‘ref_by’,$usr)->pluck(‘id’);
if($refer==”[]”){
break;
}
if($refer == “”) {
break;
}
$refUser = User::where(‘ref_by’,$usr)->with(‘plan’)->get()->all();
$commission = CommissionLog::where(‘user_id’,$usr)->with(‘userFrom’)->get()->all();
array_push($commissions,$commission);
array_push($refUsers,$refUser);
// $user=User::find($refer[0]);

$usr = $refer[0];
$i++;
}
return view(activeTemplate().’user.referred’,compact(‘commissions’,’page_title’,’refUsers’,’levels’,’user’));
}

}
Controller

programmer1453 2021-11-25 15:03:39
Hello friends, I want to do website works abroad, but I do not have a connection. how can i connect
Acird Burn 2021-11-25 16:45:49
programmer1453 2021-11-25 15:03:39
Hello friends, I want to do website works abroad, but I do not have a connection. how can i connect

Hire someone locally thier cause u can’t post jobs u don’t know about in a country that is foreign

programmer1453 2021-11-25 16:52:01
Acird Burn 2021-11-25 16:45:49
Hire someone locally thier cause u can’t post jobs u don’t know about in a country that is foreign

I think I was misunderstood, I live in Turkey, I want to do freelance work remotely to western countries.

Acird Burn 2021-11-25 16:52:35
programmer1453 2021-11-25 16:52:01
I think I was misunderstood, I live in Turkey, I want to do freelance work remotely to western countries.

Okay well upwork and freelancer are the best places to start with

Acird Burn 2021-11-25 16:52:48
Lots of work and projects thier
developerjahangir 2021-11-25 19:04:29
Anyone have nuxt js tutorial?
developerjahangir 2021-11-25 19:05:14
I need Nuxt js Course,,,,, anyone have it?
flyingdragons 2021-11-25 20:53:12
Hi how can I decerement the Float value in REDIS. There is no option the way increment has like INCRBYFLOAT
TheGuyi 2021-11-25 21:04:58
laravel_discuss-100657.jpg
hello Experts how do i capture the user name of the user who entered the Student in the DB?
TheGuyi 2021-11-25 21:05:47
using livewire, i have tried like that but no username captured
nowodev 2021-11-25 21:09:36
TheGuyi 2021-11-25 21:04:58
hello Experts how do i capture the user name of the user who entered the Student in the DB?

Firstly, I don’t think you’re inserting the user correctly.
Try

‘entered_by’ => auth()->user()->user_name

thekiharani 2021-11-25 21:11:36
QUERYING DATA BY DATE WITH DIFFERENT TIME ZONE
I need to query data by date in a different time zone. For instance, I have transactions table whose date are in UTC. I need to query daily transaction in a different timezone (UTC+3). How best can I achieve this?

Coz if a someone transact on 25th Nov 2021 at 1:30 AM in Nairobi, the dates in DB are stored as 24th Nov 2021 at 10:30 PM UTC. Is there a way to modify the created_at column before querying?

web design 2021-11-25 22:02:44
web design 2021-11-21 19:20:05
Answer

..

segungreat 2021-11-25 22:45:58
thekiharani 2021-11-25 21:11:36
QUERYING DATA BY DATE WITH DIFFERENT TIME ZONE
I need to query data by date in a different time zone. For instance, I have transactions table whose date are in UTC. I need to query daily transaction in a different timezone (UTC+3). How best can I achieve this?

Coz if a someone transact on 25th Nov 2021 at 1:30 AM in Nairobi, the dates in DB are stored as 24th Nov 2021 at 10:30 PM UTC. Is there a way to modify the created_at column before querying?

Hello, though I haven’t done anything like this, but my suggestion is save data in database using UTC, then when displaying the data to user, use user’s timezone. You can use carbon to manipulate that or use moment.js on the frontend

segungreat 2021-11-25 22:46:26
TheGuyi 2021-11-25 21:04:58
hello Experts how do i capture the user name of the user who entered the Student in the DB?

What’s your table structure

TheGuyi 2021-11-25 23:20:56
nowodev 2021-11-25 21:09:36
Firstly, I don’t think you’re inserting the user correctly.
Try

‘entered_by’ => auth()->user()->user_name

thanks had missed that its now working

thekiharani 2021-11-25 23:31:20
segungreat 2021-11-25 22:45:58
Hello, though I haven’t done anything like this, but my suggestion is save data in database using UTC, then when displaying the data to user, use user’s timezone. You can use carbon to manipulate that or use moment.js on the frontend

Displaying is OK. Problem is querying

segungreat 2021-11-25 23:39:49
thekiharani 2021-11-25 23:31:20
Displaying is OK. Problem is querying

Hmm, what have you tried?

nowodev 2021-11-26 00:08:53
TheGuyi 2021-11-25 23:20:56
thanks had missed that its now working

You’re welcome

Kibeish 2021-11-26 00:43:46
Hello guys, i imported a csv to MySQL but it did not save, no errors so far.. what might be the issue?
Kibeish 2021-11-26 00:47:34
Kibeish 2021-11-26 00:43:46
Hello guys, i imported a csv to MySQL but it did not save, no errors so far.. what might be the issue?

Good people anyone, assist

neelbas 2021-11-26 01:06:04
laravel_discuss-100673.jpg
I’m using ::insertGetId and ::insert but the above rows has NULL, why ?!
Docs: By default, Eloquent expects created_at and updated_at columns to exist on your model’s corresponding database table. Eloquent will automatically set these column’s values when models are created or updated.
segungreat 2021-11-26 01:48:12
neelbas 2021-11-26 01:06:04
I’m using ::insertGetId and ::insert but the above rows has NULL, why ?!
Docs: By default, Eloquent expects created_at and updated_at columns to exist on your model’s corresponding database table. Eloquent will automatically set these column’s values when models are created or updated.

Maybe you removed it from setting it automatically

neelbas 2021-11-26 01:48:52
segungreat 2021-11-26 01:48:12
Maybe you removed it from setting it automatically

thank you for reply, where is the settings?

segungreat 2021-11-26 01:51:56
In your model
neelbas 2021-11-26 01:52:49
segungreat 2021-11-26 01:51:56
In your model

by official laravel’s docs it is automatically, right?

|