pokeycam

Software Engineer at Glass Wall Lab Pty Ltd

Member Since 2 Months Ago

Hobart, Tasmania

Experience Points
630
Total
Experience

4,370 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
1
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 1
630 XP
Mar
16
1 month ago
Activity icon

Replied to Date Picker - Livewire

@tykus Thanks for that. I have now modified my code, however the date picker will not display. What am I missing?

resources/views/components/date-picker.blade.php

<div>
    <input
        x-data
        x-ref="input"
        x-init="new Pikaday({
            field: $refs.input,
            format:'M/D/YYYY',
            onSelect: function() {
                $('#'+$el.getAttribute('hidden_element')).val( dateToMySqlFormat(this._d) );
            }
        })"
        type="text"
        {{ $attributes }}
    >
</div>

app/View/Components/datePicker.php

<?php

namespace App\View\Components;

use Illuminate\View\Component;

class datePicker extends Component
{
    /**
     * Create a new component instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\Contracts\View\View|string
     */
    public function render()
    {
        
        return view('components.date-picker');
    }
}

resources/views/livewire/show-report-job-hours.blade.php

    <x-date-picker
        wire:model="start_date"
        id="start_date"
        autocomplete="off"
        hidden_element="hidden_start_date"
    />

Thanks in advance for any help!

Mar
15
1 month ago
Activity icon

Started a new Conversation Date Picker - Livewire

What is the best way to bring in a date picker using Livewire?

I have used Bootstrap for another non-Livewire form and that works well, however the values will not stick when using Livewire.

I just want something that is easy and going to work with Livewire.

I have tried the many examples online using Pikaday, but I get the following error -

InvalidArgumentException
Unable to locate a class or view for component [date-picker].

My code is as follows:

resources/views/livewire/show-report-job-hours.blade.php

    <form wire:submit.prevent="submit">
    <label for="date_start">Event Date</label>
    <x-date-picker
    wire:model="start_date"
    id="start_date"
    autocomplete="off"
    hidden_element="hidden_start_date"
/>

resources/views/livewire/date-picker.blade.php

<div>
    <input
        x-data
        x-ref="input"
        x-init="new Pikaday({
            field: $refs.input,
            format:'M/D/YYYY',
            onSelect: function() {
{{--                console.log(this);--}}
                $('#'+$el.getAttribute('hidden_element')).val( dateToMySqlFormat(this._d) );
            }
        })"
        type="text"
        {{ $attributes }}
    >
</div>

app/Http/Livewire/DatePicker.php

<?php

namespace App\Http\Livewire;

use Livewire\Component;

class DatePicker extends Component
{
    public function render()
    {
        return view('livewire.date-picker');
    }
}

Activity icon

Replied to Livewire Component Submit

@awsqed Genius! Thank you so much for your help on this one. $data needed to be @if(isset($result) and I removed redirect() - works a dream!

Thank you again for your help!

Activity icon

Replied to Livewire Component Submit

Thanks for that. I have changed some things around, however when I click submit, the values are coming through to the method, but they are not updating the results.

If there is an easier way then please let me know.

See below my full code

Http/Livewire/ShowReportJobHours.php

<?php

namespace App\Http\Livewire;

use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Livewire\Component;
use App\Models\Workday;
use App\Models\Timesheet;
use App\Models\Worktype;
use App\Models\Job;
use Illuminate\Http\Request;

class ShowReportJobHours extends Component
{
    public $date_start;
    public $date_end;
    public $job_id;
    public $result;
    public $jobs;

    // Add this
    protected $rules = [
        'date_start' => 'required', //whatever rules you want
        'date_end' => 'required', //whatever rules you want
        'job_id' => 'required', //whatever rules you want
    ];

    public function mount()
    {
        //get all jobs
        $this->jobs = Job::all()->sortBy('reference');
    }
    
    public function render()
    {
        return view('livewire.show-report-job-hours');
    }

    public function submit()
    {

        $this->validate();

        //convert dates to match the format in DB
        $this->date_start = Carbon::parse($this->date_start)->format('Y-m-d');
        $this->date_end = Carbon::parse($this->date_end)->format('Y-m-d');

        //Get the workdays between the start and end date
         $workdayData = DB::table('workdays')
                ->where('date', '>=', $this->date_start)
                ->where('date', '<=', $this->date_end)
                ->get();

         //create data array to contain timesheet_id and hours_[day of week], used to look up entries      
        foreach($workdayData as $workday)
        {
            $timesheet = Timesheet::where('period_id',$workday->period_id)->get();

            //get all entries for the time period
            foreach($timesheet as $sheet)
            {
                $timesheet_id = $sheet->id;
                $day = 'hours_'.strtolower(Carbon::parse($workday->date)->format('D'));

                //Get all worktypes relating to timesheet entries for period
                $result = DB::table('entries')
                ->where('job_id', '=', $this->job_id)
                ->where('timesheet_id', '=', $sheet->id)
                ->pluck('worktype_id');
                
                //Get hours per worktype
                foreach($result as $worktype)
                {
                    $dayHours = DB::table('entries')
                    ->where('job_id', '=', $this->job_id)
                    ->where('timesheet_id', '=', $sheet->id)
                    ->where('worktype_id', '=', $worktype)
                    ->value($day);
                    if($dayHours > 0)
                    {
                        $output[][$worktype] = round(floatval($dayHours),2);
                    }
                }
            }
        }

        if(isset($output))
        {
            //sum the array as a collection
            $collection = collect($output)
            ->groupBy(function ($item) {
                return collect($item)->keys()->first();
            })
            ->map(function ($items) {
                return collect($items)->flatten()->sum();
            });

            //get the total of the collection - used for total %
            $total = collect($output)->map(function ($items) {
                return collect($items)->flatten()->sum();
            })->sum();

            //add data to result array for output
            foreach($collection as $worktypeId => $hours)
            {
                $worktype = Worktype::where('id',$worktypeId)->first();
                $percentage = round(floatval($hours) / floatval($total),4)*100;
                $this->result[] = array('code' => $worktype->code, 'name' => $worktype->name, 'hours' => $hours, 'percentage' => $percentage, 'total' => $total);
            }
        }
        return redirect()->to('/report/report_job_hours');  
    }
}

resources/views/report/report_job_hours.blade.php

<?php

namespace App\Http\Livewire;

use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Livewire\Component;
use App\Models\Workday;
use App\Models\Timesheet;
use App\Models\Worktype;
use App\Models\Job;
use Illuminate\Http\Request;

class ShowReportJobHours extends Component
{
    public $date_start;
    public $date_end;
    public $job_id;
    public $result;
    public $jobs;

    // Add this
    protected $rules = [
        'date_start' => 'required', //whatever rules you want
        'date_end' => 'required', //whatever rules you want
        'job_id' => 'required', //whatever rules you want
    ];

    public function mount()
    {
        //get all jobs
        $this->jobs = Job::all()->sortBy('reference');
    }
    
    public function render()
    {
        return view('livewire.show-report-job-hours');
    }

    public function submit()
    {

        $this->validate();

        //convert dates to match the format in DB
        $this->date_start = Carbon::parse($this->date_start)->format('Y-m-d');
        $this->date_end = Carbon::parse($this->date_end)->format('Y-m-d');

        //Get the workdays between the start and end date
         $workdayData = DB::table('workdays')
                ->where('date', '>=', $this->date_start)
                ->where('date', '<=', $this->date_end)
                ->get();

         //create data array to contain timesheet_id and hours_[day of week], used to look up entries      
        foreach($workdayData as $workday)
        {
            $timesheet = Timesheet::where('period_id',$workday->period_id)->get();

            //get all entries for the time period
            foreach($timesheet as $sheet)
            {
                $timesheet_id = $sheet->id;
                $day = 'hours_'.strtolower(Carbon::parse($workday->date)->format('D'));

                //Get all worktypes relating to timesheet entries for period
                $result = DB::table('entries')
                ->where('job_id', '=', $this->job_id)
                ->where('timesheet_id', '=', $sheet->id)
                ->pluck('worktype_id');
                
                //Get hours per worktype
                foreach($result as $worktype)
                {
                    $dayHours = DB::table('entries')
                    ->where('job_id', '=', $this->job_id)
                    ->where('timesheet_id', '=', $sheet->id)
                    ->where('worktype_id', '=', $worktype)
                    ->value($day);
                    if($dayHours > 0)
                    {
                        $output[][$worktype] = round(floatval($dayHours),2);
                    }
                }
            }
        }

        if(isset($output))
        {
            //sum the array as a collection
            $collection = collect($output)
            ->groupBy(function ($item) {
                return collect($item)->keys()->first();
            })
            ->map(function ($items) {
                return collect($items)->flatten()->sum();
            });

            //get the total of the collection - used for total %
            $total = collect($output)->map(function ($items) {
                return collect($items)->flatten()->sum();
            })->sum();

            //add data to result array for output
            foreach($collection as $worktypeId => $hours)
            {
                $worktype = Worktype::where('id',$worktypeId)->first();
                $percentage = round(floatval($hours) / floatval($total),4)*100;
                $this->result[] = array('code' => $worktype->code, 'name' => $worktype->name, 'hours' => $hours, 'percentage' => $percentage, 'total' => $total);
            }
        }
        return redirect()->to('/report/report_job_hours');  
    }
}

resources/views/livewire/show-report-job-hours.blade.php

<div>
    <form wire:submit.prevent="submit">
        <input wire:model.defer="date_start" type="text">
        <input wire:model.defer="date_end" type="text">
        <select wire:model="job_id" id='job_selected'>
            @foreach($jobs as $job)
                <option value="{{ $job->id }}">{{ $job->reference }} - {{ $job->name }}</option>
            @endforeach
        </select>
        <button type="submit" class="btn btn-primary">Search</button>
    </form>
    <div class="overflow-hidden border border-gray-200 sm:rounded-lg">
        <table class="min-w-full divide-y divide-gray-200 w-full">
            <thead>
            <tr>
                <th scope="col" class="px-6 py-2 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                    Work Code
                </th>
                <th scope="col" class="px-6 py-2 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                    Name
                </th>
                <th scope="col" class="px-6 py-2 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                    Total Hours
                </th>
                <th scope="col" class="px-6 py-2 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                    % To Total
                </th>
            </tr>
            </thead>
            <tbody class="bg-white divide-y divide-gray-200">
            @if(isset($data))
                @foreach($result as $data)
                    <tr>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900">
                            {{$data['code']}}
                        </td>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900">
                            {{$data['name']}}
                        </td>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900">
                            {{number_format($data['hours'], 2, '.', ',')}}
                        </td>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900">
                            {{$data['percentage']}}%
                        </td>
                    </tr>
                    @if($loop->last)
                    <tr>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900">
                        </td>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900 text-right">
                            Total Hours:
                        </td>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900">
                        {{number_format($data['total'], 2, '.', ',')}}
                        </td>
                        <td class="px-6 py-2 whitespace-nowrap text-sm text-gray-900">
                        </td>
                    </tr>
                    @endif
                @endforeach
                @endif
            </tbody>
        </table>
    </div>
</div>
Activity icon

Started a new Conversation Livewire Component Submit

I'm sure this is a basic question, but it's been driving me mad so please forgive me.

I have a Livewire component (show-report-job-hours) which is to receive a start date, end date and a job ID. It's to show a report based on those inputs. I'm having trouble passing the date and job ID to my Livewire component. Please see some of my code below

views\report\report_job_hours.blade.php

@livewire('show-report-job-hours',['date_start' => '[start_date]','date_end' => '[end_date]','job_id' => [job_id]])

views\livewire\show-report-job-hours.blade.php

    <form wire:submit.prevent="submit">
        <select wire:model="job_id" id='job_selected'>
            @foreach($jobs as $job)
                <option value="{{ $job->id }}">{{ $job->reference }} - {{ $job->name }}</option>
            @endforeach
        </select>
        <button type="submit" class="btn btn-primary">Search</button>
    </form>

Http/Livewire/ShowReportJobHours.php

    public function submit()
    {
        return view('report.report_job_hours')->with('job_id',$this->job_id);
    }

Any help would be greatly appreciated, and I apologise in advance that this is probably a basic question.

Please let me know if more details are required.

Mar
03
1 month ago
Activity icon

Started a new Conversation Livewire Encountered Corrupt Data

I'm having some issues with Livewire giving me the following error

Livewire encountered corrupt data when trying to hydrate the [show-timesheet] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.

Basically I'm trying to display a Livewire drop-down menu with a list of times. Please let me know if there is a better way.

Http/Controllers/Livewire/ShowTimesheet.php

class ShowTimesheet extends Component
{
	public $start_times;
}

public function mount()
{

	$this->start_times = array(
        '0000' => '00:00',
        '0025' => '00:25',
        '0030' => '00:30',
        '0045' => '00:45',
        '0100' => '01:00',
        '0125' => '01:25',
        '0130' => '01:30',
        '0145' => '01:45',
        '0200' => '02:00',
        '0225' => '02:25',
        '0230' => '02:30',
        '0245' => '02:45',
        '0300' => '03:00',
        '0325' => '03:25',
        '0330' => '03:30',
        '0345' => '03:45',
        '0400' => '04:00',
        '0425' => '04:25',
        '0430' => '04:30',
        '0445' => '04:45',
        '0500' => '05:00',
        '0525' => '05:25',
        '0530' => '05:30',
        '0545' => '05:45',
        '0600' => '06:00',
        '0625' => '06:25',
        '0630' => '06:30',
        '0645' => '06:45',
        '0700' => '07:00',
        '0725' => '07:25',
        '0730' => '07:30',
        '0745' => '07:45',
        '0800' => '08:00',
        '0825' => '08:25',
        '0830' => '08:30',
        '0845' => '08:45',
        '0900' => '09:00',
        '0925' => '09:25',
        '0930' => '09:30',
        '0945' => '09:45',
        '1000' => '10:00',
        '1025' => '10:25',
        '1030' => '10:30',
        '1030' => '10:30',
        '1045' => '10:45',
        '1100' => '11:00',
        '1125' => '11:25',
        '1130' => '11:30',
        '1145' => '11:45',
        '1200' => '12:00',
        '1225' => '12:25',
        '1230' => '12:30',
        '1245' => '12:45',
        '1300' => '13:00',
        '1325' => '13:25',
        '1330' => '13:30',
        '1345' => '13:45',
        '1400' => '14:00',
        '1425' => '13:25',
        '1430' => '14:30',
        '1445' => '14:45',
        '1500' => '15:00',
        '1525' => '15:25',
        '1530' => '15:30',
        '1545' => '15:45',
        '1600' => '16:00',
        '1625' => '16:25',
        '1630' => '16:30',
        '1645' => '16:45',
        '1700' => '17:00',
        '1725' => '17:25',
        '1730' => '17:30',
        '1745' => '17:45',
        '1800' => '18:00',
        '1825' => '18:25',
        '1830' => '18:30',
        '1845' => '18:45',
        '1900' => '19:00',
        '1925' => '19:25',
        '1930' => '19:30',
        '1945' => '19:45',
        '2000' => '20:00',
        '2025' => '20:25',
        '2030' => '20:30',
        '2045' => '20:45',
        '2100' => '21:00',
        '2125' => '21:25',
        '2130' => '21:30',
        '2145' => '21:45',
        '2200' => '22:00',
        '2225' => '22:25',
        '2230' => '22:30',
        '2245' => '22:45',
        '2300' => '23:00',
        '2325' => '23:25',
        '2330' => '23:30',
        '2345' => '23:45',
       );

$this->workdays = [basically sets dates Mon - Sun from the database]
}

views\livewire\show-timesheet.bldae.php (component)

@foreach($workdays as $index => $day)
<td class='content-center px-2'>
<select class="form-control w-32" wire:model='timeentries.0.start_{{strtolower(date('D',strtotime($day['date'])))}}'>
	@foreach($start_times as $value => $time)
		<option value="{{$value}}">
			{{$time}}
		</option>
	@endforeach
	</select>
	</td>    
@endforeach

Any help would be greatly appreciated.

Activity icon

Replied to Passing Existing Select Value To Radio Button Set

Thanks @neilstee, I'm a bit of a noice and still learning.

I added the withInput(), however it still didn't work. I did however get it working by removing old()

<input type="radio" id="client" name="internal" value="0" {{ $job->internal == '0' ? 'checked' : '' }}>

Thanks for your help!

Mar
02
1 month ago
Activity icon

Started a new Conversation Passing Existing Select Value To Radio Button Set

Hi,

I'm having trouble using the old(). Has something changed? Please let me know if you have any ideas on getting it to work. I just want to display the selected value for a set of radio buttons.

Code below -

<input type="radio" id="client" name="internal" value="0" {{ old('internal') == '0' ? 'checked' : '' }}>
<label for="client" class='font-medium text-sm text-gray-700'>Client</label>
<input type="radio" id="internal" name="internal" value="1" {{ old('internal') == '1' ? 'checked' : '' }}>
<label for="client" class='font-medium text-sm text-gray-700'>Internal</label>
<input type="radio" id="admin" name="internal" value="2" {{ old('internal') == '2' ? 'checked' : '' }}>
<label for="client" class='font-medium text-sm text-gray-700'>Admin</label>

Any help would be appreciated.

Feb
21
1 month ago
Activity icon

Replied to Jetstream - Password Reset On Frist Login

@snapey @chaudigv Thanks for your help. I will reply to this post and let you know how I went for future reference. Thank you both again for your help!

Activity icon

Started a new Conversation Jetstream - Password Reset On Frist Login

Hi,

I'm using Jetstream for user management. I currently have a feature that sends a SMS invite to a new user with a random password. I wish for when they first login it will display a page that requests they reset their password.

I have thought of using the logic that if the user created_at and updated_at are the same time, then it must be their first login, then display form.

Where would I place this logic in the Jetstream process? Any hints or idea to solve this problem would be great!

Let me know if you need more detail.

Feb
18
1 month ago
Activity icon

Replied to Drop-down Passing Result - Livewire

@corvs Thanks for you help :)

Activity icon

Replied to Drop-down Passing Result - Livewire

Thank you for that. This is my first Laravel project so I appreciate the help.

It looks like I'll have to use events as my timesheet requires Livewire.

If anyone can help with the events I would be very appreciative.

Activity icon

Started a new Conversation Drop-down Passing Result - Livewire

Hi,

This is probably something that has been answered many times before. But I'm unable to find a nice simple guide online.

I want to have a drop-down menu on a page, and then the table to change depending on the value selected. In my case, I want a drop-down of employees, and the relevant timesheet is displayed.

I'm currently using Livewire to do this. The table that I need to pass the employee ID is another Livewire component (ShowTimesheet.php), which display the timesheet page to timesheet.index.blade.

My code is as follows:

Http/Livewire/ShowUserDropDown.php

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use App\Models\User;

class ShowUserDropdown extends Component
{
    public $users;
    public $selectedUser;

    public function render()
    {
        $this->users = User::all()->sortByDesc('name');

        return view('livewire.show-user-dropdown', [
            'users' => $this->users,
        ]);
    }
}

views/livewire/show-user-dropdown.blade.php

<div>
<div class="col-md-2">
    <select wire:model="selectedUser" class="form-control">
        <option value="" selected>Choose User</option>
            @foreach($users as $user)
                <option value="{{ $user->id }}">{{ $user->name }}</option>
            @endforeach
        </select>
        </div>
</div>

Please let me know if you need any additional information, and thank you for looking at my questions.

Jan
27
2 months ago
Activity icon

Replied to Sum HTML Table Columns Using Livewire

Awesome! That was a massive help @marianomoreyra

If anyone is using the above code, there is a slight typo, columName should be columnName.

I also changed it from wire:keydown to wire:keyup, as I was having some issue with the total not updated if you clicked away from the textfield.

The code I used to render to the view:

@if(isset($totals['hours_wed']))
	{{$totals['hours_wed']}}
@endif

Thanks again @marianomoreyra for your help, it was a massive help and saved me a lot of time.

Jan
22
2 months ago
Activity icon

Started a new Conversation Sum HTML Table Columns Using Livewire

Hi,

I'm new to Laravel and still finding my way around things. Anyway, I have a slight issue that I need some guidance on.

I have a HTML table that uses Livewire so the user can create additional rows. I wish to create a total (sum) of each column after the user has completed their text (hours) input.

I have included a screenshot of what I am after (https://ibb.co/z6C07YF), the red number is what I would like to update as the total.

I just need some help on how to do the calculation after the user input, and then how to send it back to the view.

Snippet of my code:

Controllers\Livewire\ShowTimesheet.php

..
public $entries = [];

...
public function addEntry()
{
  $this->entries[] = ['job_id' => '', 'worktype_id' => '',
  'hours_mon' => '',
  'hours_tue' => '',
  'hours_wed' => '',
  'hours_thu' => '',
  'hours_fri' => '',
  'hours_sat' => '',
  'hours_sun' => '',
   ];
}
...

livewire\timesheet.blade.php

...

//each entry row has 7 of these text boxes (for each day of the week). I wish to add up all the say Sunday boxes, and display this below the table

<td class='content-center px-2'>
<input type='text' name='entries[{{$index}}][hours_sun]' wire:model='entries.{{$index}}.hours_sun' class='border-2 border-gray-300 rounded w-16 text-lg p-2 text-center disabled:opacity-25' @if($day['locked'] == 1) disabled @endif>
</td>
...

Please let me know if more code would be worth while.