fbc

Member Since 4 Years Ago

Experience Points
9,770
Total
Experience

230 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
8
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 2
9,770 XP
Jan
25
1 month ago
Activity icon

Started a new Conversation Taking Measurements Inside An Image

Does anyone know of any Laravel Package that will take measurements inside an image?

If someone were to stand next to an image with a meter stick painted a fluorescent green. I'd like to be able to write code to detect the meter stick and then have every other dimension drawn on the image compared to scale of the meter stick as a reference.

Dec
21
2 months ago
Activity icon

Started a new Conversation Is It Possible For Laravel To Accept A Windows Snippet Object? From Clipboard?

Is it possible for someone to cut and paste snippets from the windows snippet tool into a laravel generated webpage then saved and displayed.

Dec
17
2 months ago
Activity icon

Replied to Displaying Field Only If Wire:model="x" = Y?

Disregard.. it works.. I just had a typo.

Activity icon

Started a new Conversation Displaying Field Only If Wire:model="x" = Y?

I want to show an input field if the value of another field has a certain value.

<form>
    <input type="hidden" wire:model="id">
    <div class="component-container form-group">
        <label for="text-name">
            Type
        </label>
        <div class="input-group">
            <div class="input-group-prepend">
                <span class="input-group-text">
                    <i class="fas fa-tape"></i>
                </span>
            </div>

            {!! Form::select('type', [0 => 'Rubber', 1 => 'Metal'], 0, ['wire:model' => 'type']) !!}
        </div>
    </div>
@if ($type == 0)
    {{ inputText()->prepend('<i class="fas fa-user"></i>')->name('name')->label('Name')->placeholder('')
    ->componentHtmlAttributes(['required','wire:model' => 'name'])}}
@endif
    {{ inputNumber()->prepend('<i class="fas fa-paint-roller"></i>')->name('coverage')->label('Coverage')->placeholder('ex. 1.5 (for 18 inches)')->caption('In feet')
    ->componentHtmlAttributes(['wire:model' => 'coverage'])}}
    {{ inputNumber()->prepend('<i class="fas fa-text-width"></i>')->name('sheet_width')->label('Sheet Width')->placeholder('ex. 1.5 (for 18 inches)')->caption('In feet')
    ->componentHtmlAttributes(['wire:model' => 'sheet_width'])}}
    {{ inputNumber()->prepend('<img src="/images/icons/screw-50.png" height="20em">')->name('sscrew_type')->label('Screw Type')->placeholder('')
    ->componentHtmlAttributes(['wire:model' => 'sscrew_type'])}}
    {{ inputNumber()->prepend('<i class="fas fa-hard-hat"></i>')->name('vendor_id')->label('Vendor Id')->placeholder('')
    ->componentHtmlAttributes(['wire:model' => 'vendor_id'])}}
    {{ inputNumber()->prepend('<i class="fas fa-toilet-paper"></i>')->name('material_cost_per_roll')->label('Material Cost per Roll')->placeholder('')->value(1)
    ->componentHtmlAttributes(['required','wire:model' => 'material_cost_per_roll'])}}
    {{ inputNumber()->prepend('<i class="fas fa-ruler-combined"></i>')->name('install_cost_per_sqft')->label('Install Cost per Sqft')->placeholder('')->value(1)
    ->componentHtmlAttributes(['required','wire:model' => 'install_cost_per_sqft'])}}
    {{ inputNumber()->prepend('<i class="fas fa-dollar-sign"></i>')->name('install_sqft_per_hour')->label('Install Sqft per Hour')->placeholder('')->value(1)
    ->componentHtmlAttributes(['required','wire:model' => 'install_sqft_per_hour'])}}
    <button wire:click.prevent="update()" class="btn btn-dark">Update</button>
    <button wire:click.prevent="cancel()" class="btn btn-danger">Cancel</button>
</form>
Dec
10
2 months ago
Activity icon

Started a new Conversation How Do You Display An Image Stored In The Storage Directory??

I recently began using livewire and can't seem to get it to save to the public_path /upload directory so I can formulate an link to display and image.

DetailImageUpload.php

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use Livewire\WithFileUploads;
use App\Models\estimate\Detail;

class DetailImageUpload extends Component
{
    use WithFileUploads;

    public $image;
    public $detail_id;

    public function render()
    {
        return view('livewire.detail-image-upload');
    }

    public function save()
    {
        $this->validate([
            'image' => 'image|max:1024', // 1MB Max
        ]);

        $image = $this->image->storeAs('details', $this->detail_id);
        $data['image'] = $image;
 
        $detail = Detail::find($this->detail_id);
        $detail->update($data);
    }
}

I tried changing the storeAs to '/public/upload' but it ends up only creating that structure under storage.

Activity icon

Replied to Undefined Variable Using Livewire

@sinnbeck How do I display that image publicly if it's in the storage/details folder. I can't seem to formulate an IMG tag that can display it.

What is the proper way? Do I need to figure out a way to save it to the directory in the PUBLIC folder?

Activity icon

Started a new Conversation Undefined Variable Using Livewire

I'm beginning to learn how to use Livewire, so bare with me. I'm a little green around the edges.

Livewire\DetailImageUpload.php:

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use Livewire\WithFileUploads;
use App\Models\estimate\Detail;

class DetailImageUpload extends Component
{
    use WithFileUploads;

    public $image;
    public $detail_id;

    public function render()
    {
        return view('livewire.detail-image-upload');
    }

    public function save()
    {
        $this->validate([
            'image' => 'image|max:1024', // 1MB Max
        ]);

        $image = $this->image->store('details');
        $data['image'] = $image;
 
        $detail = Detail::find('id', $detail_id);
        $detail->update($data);
    }
}

the error is with line:

$detail = Detail::find('id', $detail_id);

Undefined variable: detail_id

I'm passing it in the form via a hidden form input. My show.blade.php has:

@livewire('detail-image-upload', ['detail_id' => $detail->id])

and detail-image-upload.blade.php has the hidden for input as so.

<form wire:submit.prevent="save">
    @if ($image)
    Image Preview:
    <img src="{{ $image->temporaryUrl() }}" width=100%>
    @endif
    <input type="file" wire:model="image">
    <input type="hidden" wire:model="detail_id" value="{{$detail_id}}">

    @error('image') <span class="error">{{ $message }}</span> @enderror

    <button type="submit">Save Image</button>
</form>

I know the variable is being passed to the form because when I change the input type from hidden to text, I can see the number.

Dec
09
2 months ago
Activity icon

Started a new Conversation Submitless Upload And Display Possible?

I have laravel with livewire installed. I'm trying to make a form that allows the user to drop an image over a upload area then display the image without having to submit the form.

The idea is that the image has information that the user needs to interpret and input into the form.

Is there any livewire or guides that might help me accomplish this?

Nov
18
3 months ago
Activity icon

Replied to How Do You Set The Inital Sort When Using Datatables?

I figured it out. I added:

        "order": [[ 5, "desc" ]],

to my script in the blade file. I hope this helps others.

<script type="text/javascript">
$(function() {
    var table = $('.demo_table').DataTable({
        "order": [[ 5, "desc" ]],
        processing: true,
        serverSide: true,
        ajax: "{{ route('bid.index') }}",
        columns: [{
                "data": "id"
            },
            {
                "data": "project_name"
            },
            {
                "data": "location"
            },
            {
                "data": "contractorsdesc"
            },
            {
                "data": "estimatordesc"
            },
            {
                "data": "closing_datetimedesc"
            },
            {
                "data": "biddingdesc"
            },
            {
                "data": "wondesc"
            },
            {
                data: "actions",
                render: function(data) {
                    return htmlDecode(data);
                },
            }
        ]
    });
});
</script>
Activity icon

Started a new Conversation How Do You Set The Inital Sort When Using Datatables?

My controller is as so:

    public function index(Request $request)
    {

        if ($request->ajax()) {
            if ($request->session()->get('phase') == "tracking") {
                $data = Bid::where('submitted', 0)->latest()->get();
            }
            if ($request->session()->get('phase') == "submitted") {
                $data = Bid::where('submitted', 1)->latest()->get();
            }
            return Datatables::of($data)->with('estimator', 'contractors')
                ->addColumn('project_name', function ($row) {
                    $showUrl = route('bid.show', $row->id);
                    return '<a href="' . $showUrl . '">' . $row->project_name . '</a>';
                })
                ->addColumn('contractorsdesc', function ($row) {
                    foreach ($row->contractors as $contractor) {
                        $x = $contractor->first_name . ' ' . $contractor->last_name . ' (' . $contractor->company->name . ')' . '</br>';
                    }
                    return $x ?? '';
                })
                ->addColumn('estimatordesc', function ($row) {
                    return $row->estimator->name ?? 'none';
                })
                ->addColumn('closing_datetimedesc', function ($row) {
                    return Carbon\Carbon::parse($row->closing_datetime)->toDayDateTimeString();
                })
                ->addColumn('biddingdesc', function ($row) {
                    if ($row->bidding == 2) {
                        return '<span style="color: orange">Undecided</span>';
                    }
                    if ($row->bidding == 1) {
                        return '<span style="color: green">Yes</span>';
                    }
                    if ($row->bidding == 0) {
                        return '<span style="color: red">No</span>';
                    }
                })
                ->addColumn('wondesc', function ($row) {
                    if ($row->won == 1) {
                        return '<span style="color: green">Yes</span>';
                    }
                    if ($row->won == 0) {
                        return '<span style="color: red">No</span>';
                    }
                })
                ->addColumn('actions', function ($row) {
                    $editUrl = route('bid.show', $row->id);
                    $deleteUrl = route('bid.destroy', $row->id);

                    return view('snippets._formActions', compact('editUrl', 'deleteUrl'));
                })
                ->rawColumns(['project_name', 'wondesc', 'biddingdesc', 'contractorsdesc'])
                // ->order(function ($query) {
                //     if (request()->has('closing_datetime')) {
                //         $query->orderBy('closing_datetime', 'desc');
                //     }
                // })
                ->make(true);
        }

        return view('bid.index');
    }

if I uncomment the section that reads:

                // ->order(function ($query) {
                //     if (request()->has('closing_datetime')) {
                //         $query->orderBy('closing_datetime', 'desc');
                //     }
                // })

it sorts the datatable properly, however you can no longer sort by any other column. It will fix the sort only by that column.

I just want to sort that way initially yet allow users to continue to click on whatever column they wish to sort by.

I've already tried changing the following lines as so:

            if ($request->session()->get('phase') == "tracking") {
                $data = Bid::where('submitted', 0)->orderBy('closing_datetime', 'desc')->get();
            }
            if ($request->session()->get('phase') == "submitted") {
                $data = Bid::where('submitted', 1)->orderBy('closing_datetime', 'desc')->get();
            }

However they seems to have no effect when done at that point. I'm using yajra/laravel-datatables and the initial guide was https://www.positronx.io/laravel-datatables-example/.

Nov
17
3 months ago
Activity icon

Started a new Conversation Proper Model Method To Run Formula On Each Record Returned.

I have implemented revisions on a Model called ChangeOrder by adding an extra field called 'co_id'. If 'co_id' is null then it's an original ChangeOrder. If there is a number in 'co_id' field, then it's a revision of the id number in the field.

So I thought I'd implement the query like this, however I don't think booted() is the proper method to use:

class ChangeOrder extends Model
{
    use Commentable;

    protected $fillable = [
...
...
    ];

    protected static function booted()
    {
        $x = collect();
        // If this guy has revisions of itself
        if ($this->revision->count() > 0) {
            // let the latest record become the last revison changeorder made
            // push to new collection?
            $x->push($this->revision->last());
        } else {
            $x->push($this);
        }
        return $x;
    }

    public function revisions()
    {
        return $this->hasMany('App\Models\project\changeorder\ChangeOrder', 'co_id', 'id');
    }

Right not I have to do this inside my controller. I would like to just be able to get the changeorders through the relationship (i.e., $project->changeorders) without having to filter them like this everytime. I'ts more of an optimization thing.

    public function show(Project $project)
    {

        // dd($project->changeorders);

        /** Query last 3 changeorders */
        $changeorders = collect();
        foreach ($project->changeorders->sortByDesc('created_at')->take(3) as $changeorder) {
            // If this guy has revisions of itself
            if ($changeorder->revisions->count() > 0) {
                // let the latest record become the last revison changeorder made
                // push to new collection?
                $changeorders->push($changeorder->revisions->last());
            } else {
                $changeorders->push($changeorder);
            }
        }
        return view('project.show', compact('project', 'changeorders'));
    }
Nov
16
3 months ago
Activity icon

Replied to How Do I Push A Single Record To A New Collection?

Thanks for your replies!

Activity icon

Replied to How Do I Push A Single Record To A New Collection?

Sure its defined as:

    public function changeorders()
    {
        return $this->hasMany('App\Models\project\changeorder\ChangeOrder', 'project_id', 'id')->where('co_id', null);
    }

the reason I do:

->where('co_id', null);

is because records with a co_id are revisions of the record number stored in co_id.

So this is why:

        /** Query last 3 changeorders */
        $changeorders = collect();
        foreach ($project->changeorders->all() as $changeorder) {
            // If this guy has revisions of itself
            if ($project->changeorders->where('co_id', $changeorder->id)->count() > 0) {
                // let the current record become the last revison changeorder made
                // push to new collection?
                $changeorders->push($project->changeorders->where(
                    'co_id',
                    $changeorder->id
                )->orderBy('created_at', 'desc')->first());
            } else {
                $changeorders->push($changeorder);
            }
            if ($changeorders->count() == 3) {
                break;
            }
	}

did not end up working for me and I need to switch back to:

        /** Query last 3 changeorders */
        $changeorders = collect();
        foreach ($project->changeorders->sortByDesc('created_at')->all() as $changeorder) {
            // If this guy has revisions of itself
            if (ChangeOrder::where('co_id', $changeorder->id)->count() > 0) {
                // let the latest record become the last revison changeorder made
                // push to new collection?
                $changeorders->push(ChangeOrder::where(
                    'co_id',
                    $changeorder->id
                )->OrderBy('created_at', 'desc')->first());
            } else {
                $changeorders->push($changeorder);
            }
            if ($changeorders->count() == 3) {
                break;
            }
        }

I going with model that looks like this:

//our new version that filters out all the older revisons, etc.
    public function changeorders()
    {
        return $this->hasMany('App\Models\project\changeorder\ChangeOrder', 'project_id', 'id')->where('co_id', null);
    }

//unfiltered version for queries
    public function changeOrdersRaw()
    {
        return $this->hasMany('App\Models\project\changeorder\ChangeOrder', 'project_id', 'id');
    }

Activity icon

Replied to How Do I Push A Single Record To A New Collection?

@automica Do you have any hints or idea how I can do it within the model itself?? Something like:

class ChangeOrder extends Model
{

    protected static function booted()
    {
                    // If this guy has revisions of itself
                    if (ChangeOrder::where('co_id', $this->id)->count() > 0) {
                        // let the latest record become the last revison changeorder made
                        // push to new collection?
                        $x->push(ChangeOrder::where(
                            'co_id',
                            $this->id
                        )->OrderBy('created_at', 'desc')->first());
                    } else {
                        $x->push($this->currentrecord);
                    }
                    return $x;
    }

}


Activity icon

Replied to How Do I Push A Single Record To A New Collection?

oops hold on.. I see what you mean..

I corrected to this:

        /** Query last 3 changeorders */
        $changeorders = collect();
        foreach ($project->changeorders->all() as $changeorder) {
            // If this guy has revisions of itself
            if ($project->changeorders->where('co_id', $changeorder->id)->count() > 0) {
                // let the current record become the last revison changeorder made
                // push to new collection?
                $changeorders->push($project->changeorders->where(
                    'co_id',
                    $changeorder->id
                )->orderBy('created_at', 'desc')->first());
            } else {
                $changeorders->push($changeorder);
            }
            if ($changeorders->count() == 3) {
                break;
            }
        }
Activity icon

Replied to How Do I Push A Single Record To A New Collection?

YEs if you notice I eliminated it in the last version!

Activity icon

Replied to How Do I Push A Single Record To A New Collection?

@automica Many thanks I ended up using:

        /** Query last 3 changeorders */
        $changeorders = collect();
        foreach ($project->changeorders->all() as $changeorder) {
            // If this guy has revisions of itself
            if (ChangeOrder::where('co_id', $changeorder->id)->count() > 0) {
                // let the current record become the last revison changeorder made
                // push to new collection?
                $changeorders->push(ChangeOrder::where(
                    'co_id',
                    $changeorder->id
                )->orderBy('created_at', 'desc')->first());
            } else {
                $changeorders->push($changeorder);
            }
            if ($changeorders->count() == 3) {
                break;
            }
        }
Activity icon

Started a new Conversation How Do I Push A Single Record To A New Collection?

Everytime I show this list called changeorders in a blade I have to use this code:

                        @foreach ($cors as $changeorder)
                        <tr>
                            <th scope="row">
                                <!-- If this guy has versions of itself -->
                                @if(App\Models\project\changeorder\ChangeOrder::where('co_id',$changeorder->id)->count()>0)
                                @php
                                // let the current record become the last revison changeorder made
                                $changeorder = App\Models\project\changeorder\ChangeOrder::where('co_id',
                                $changeorder->id)->orderBy('created_at', 'desc')->first();
                                @endphp
                                @endif
                                
                                <a href="{{route('project.changeorder.show', compact('project', 'changeorder'))}}">
                                    {{-- If the changorder is a reversion --}}
                                    @if($changeorder->co_id)
                                    {{-- Show the sequential co number and the sequential revision number --}}
                                    {{$changeorder->num}}.{{$changeorder->rev_num}}
                                    @else
                                    {{-- Show the sequential co number and the sequential revision number --}}
                                    {{$changeorder->num}}
                                    @endif
                                </a>
                            </th>
                            <td><!-- Empty status area --></td>
                            <td>{{$changeorder->name}}</td>
                            {{-- <td>@mdo</td> --}}
                        </tr>
                        @endforeach

I'm don't want to put code into a blade file as I've been told it's not a good practice. So I need to do something like this in my controller:

    public function show(Project $project)
    {

        /** Query last 3 changeorders */
        $cors = $project->changeorders()->all();
        $newcollection = [];
        foreach ($cors as $changeorder) {
            // If this guy has revisions of itself
            if (ChangeOrder::where('co_id', $changeorder->id)->count() > 0) {
                // let the current record become the last revison changeorder made
                // push to new collection?
                $newcollection->push = ChangeOrder::where(
                    'co_id',
                    $changeorder->id
                )->orderBy('created_at', 'desc')->first();
            }
            if ($newcollection->count() == 3){
            endforeach;
            }
        }
        return view('project.show', compact('project', 'newcollection'));
    }

Please excuse the my noobness... when working with arrays and collections I'm such a noob.

Nov
09
3 months ago
Activity icon

Replied to Package Installation Problem - Maddhatter/laravel-fullcalendar

Found it: just changed :

                $events[] = Calendar::event(
                    $value->project_name,
                    true,
                    new \DateTime($value->closing_datetime),
                    new \DateTime($value->closing_datetime)
                );

to:

                $events[] = Calendar::event(
                    $value->project_name,
                    false,
                    new \DateTime($value->closing_datetime),
                    new \DateTime($value->closing_datetime)
                );
Activity icon

Replied to Package Installation Problem - Maddhatter/laravel-fullcalendar

@marianomoreyra I'm actually using:

	$table->datetime('start');
        $table->datetime('end');

instead of:

            $table->date('start');
            $table->date('end');

but can't get the time to show on the calendar. It works great going from date to date, but it ignores the time. Any ideas?

Activity icon

Started a new Conversation Package Installation Problem - Maddhatter/laravel-fullcalendar

I'm trying to follow this guide: https://xpertphp.com/laravel-7-fullcalendar-example-tutorial/ however when I try to install I get:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for maddhatter/laravel-fullcalendar ^1.3 -> satisfiable by maddhatter/laravel-fullcalendar[v1.3.0].
    - Conclusion: remove laravel/framework v7.28.4
    - Conclusion: don't install laravel/framework v7.28.4
    - maddhatter/laravel-fullcalendar v1.3.0 requires illuminate/support ~5.0 -> satisfiable by illuminate/support[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9].
    - don't install illuminate/support 5.5.x-dev|don't install laravel/framework v7.28.4
    - don't install illuminate/support 5.6.x-dev|don't install laravel/framework v7.28.4
    - don't install illuminate/support 5.7.17|don't install laravel/framework v7.28.4
    - don't install illuminate/support 5.7.18|don't install laravel/framework v7.28.4
    - don't install illuminate/support 5.7.19|don't install laravel/framework v7.28.4
...
...
    - don't install illuminate/support v5.4.19|don't install laravel/framework v7.28.4
    - don't install illuminate/support v5.4.27|don't install laravel/framework v7.28.4
    - don't install illuminate/support v5.4.36|don't install laravel/framework v7.28.4
    - don't install illuminate/support v5.4.9|don't install laravel/framework v7.28.4
    - Installation request for laravel/framework (locked at v7.28.4, required as ^7.0) -> satisfiable by laravel/framework[v7.28.4].

I'm trying to figure out how they were able to install it. It seems strange there was no reference to how they did it.

Oct
30
3 months ago
Activity icon

Replied to Pivot Table Woes.

@rodrigo.pedra @sinnbeck OK! I think I got it!

I had to use unsignedBigInteger instead of bigUnsignedInteger

Activity icon

Replied to Pivot Table Woes.

@rodrigo.pedra @sinnbeck I got error:

  SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key (SQL: create table `contact_estimate` (`contact_id` bigint unsigned not null auto_increment primary key, `estimate_id` bigint unsigned not null auto_increment primary key) default character set utf8 collate 'utf8_unicode_ci')

when I switched to this:

    public function up()
    {
        Schema::create('contact_estimate', function (Blueprint $table) {
            $table->bigIncrements('contact_id')->unsigned()->index();
            $table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade');
            $table->bigIncrements('estimate_id')->unsigned()->index();
            $table->foreign('estimate_id')->references('id')->on('estimates')->onDelete('cascade');
            $table->primary(['contact_id', 'estimate_id']);
        });
    }
Activity icon

Replied to Pivot Table Woes.

yup just noticed that bt it still didn't fix my problem..

Activity icon

Started a new Conversation Pivot Table Woes.

I'm getting:

  SQLSTATE[HY000]: General error: 1005 Can't create table `estimatorstaging`.`contact_estimate` (errno: 150 "Foreign key constraint is incorrectly formed") (SQL: alter table `contact_estimate` add constraint `contact_estimate_contact_id_foreign` foreign key (`contact_id`) references `contact` (`id`) on delete cascade)

My pivot table looks like this:

...
    public function up()
    {
        Schema::create('contact_estimate', function (Blueprint $table) {
            $table->integer('contact_id')->unsigned()->index();
            $table->foreign('contact_id')->references('id')->on('contacts')->onDelete('cascade');
            $table->integer('estimate_id')->unsigned()->index();
            $table->foreign('estimate_id')->references('id')->on('estimates')->onDelete('cascade');
            $table->primary(['contact_id', 'estimate_id']);
        });
    }
...

my estimate table looks like this:

...
    public function up()
    {
        Schema::create('estimates', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->text('name');
            $table->integer('phase_id');
            $table->integer('status')->default(1);
            $table->integer('estimator_id');
            $table->integer('measurement_unit');
            $table->date('deadline_date');
            $table->time('deadline_time');

            $table->string('shipto_name')->nullable();
            $table->string('shipto_addr1')->nullable();
            $table->string('shipto_addr2')->nullable();
            $table->string('shipto_city')->nullable();
            $table->string('shipto_prov')->nullable();
            $table->string('shipto_pc')->nullable();
            $table->timestamps();
        });
    }
...

and my contact table looks like this:

...
    public function up()
    {
        Schema::create('contacts', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('company_id');
            $table->string('first_name');
            $table->string('last_name');
            $table->string('title');
            $table->string('email');
            $table->string('phone')->nullable();
            $table->string('ext')->nullable();
            $table->string('estimate_email')->nullable();
            // $table->json('contactrole_id')->nullable();
            $table->longText('notes')->nullable();
            $table->integer('project_assignment')->default(1);
            $table->boolean('active')->default(1);
            $table->timestamps();
        });
    }
...

I can't seem to figure out what I'm doing wrong.

Oct
28
3 months ago
Activity icon

Started a new Conversation Using Yajra Datatables Correctly For Deletes

My original delete syntax was as follow for every row in the table

...
                            <td class="row" style="text-align: right;">
                                <a href="{{route('project.edit',$project->id)}}">
                                    <i class="fas fa-cog"></i>
                                </a>
                                <form action="{{ route('project.destroy',$project->id) }}" method="POST">
                                    @csrf
                                    @method('DELETE')
                                    <button type="submit" class="btn btn-danger"
                                        onclick="return confirm('Are You Sure Want to Delete?')"
                                        style="padding: .0em !important;font-size: xx-small;">X</a>
                                </form>
                            </td>
...

I follow this guide: https://www.positronx.io/laravel-datatables-example/

and my resulting code in my controller looks like this:

...
    public function index(Request $request)
    {
        if ($request->ajax()) {
            $data = Project::latest()->get();
            return Datatables::of($data)
                ->addIndexColumn()
                ->addColumn('contractor', function ($row) {
                    $x = $row->contractor->first_name . ' ' . $row->contractor->last_name . ' (' . $row->contractor->company->name . ')';
                    return $x;
                })
                ->addColumn('action', function ($row) {
                    $btn = '<a href="javascript:void(0)" class="edit btn btn-success btn-sm">Edit</a> <a href="javascript:void(0)" class="delete btn btn-danger btn-sm">Delete</a>';
                    $x = '
                    <a href="{{route(\'project.edit\',$row->id)}}">
                    <i class="fas fa-cog"></i>
                    </a>
                    <form action="{{ route(\'project.destroy\',' . $row->id . ') }}" method="POST">
                    @csrf
                    @method(\'DELETE\')
                    <button type="submit" class="btn btn-danger"
                        onclick="return confirm(\'Are You Sure Want to Delete?\')"
                        style="padding: .0em !important;font-size: xx-small;">X</a>
                    </form>
                ';
                    return $x;
                })
                ->rawColumns(['action'])
                ->make(true);
        }

        return view('project.index');
    }
...

and my script in my index is as follows:

...
<script type="text/javascript">
    $(function () {
      
      var table = $('.yajra-datatable').DataTable({
          processing: true,
          serverSide: true,
          ajax: "{{ route('project.index') }}",
          columns: [
              {data: 'id', name: 'id'},
              {data: 'name', name: 'name'},
              {data: 'project_address', name: 'project_address'},
              {data: 'owner', name: 'owner'},
              {data: 'contractor', name: 'contractor'},
              {
                  data: 'action', 
                  name: 'action', 
                  orderable: true, 
                  searchable: true
              },
          ]
      });
      
    });
</script>
...

and my datatable section is as follows:

...
    <div class="col-md-12">
        <div class="card">
            {{-- <h2 class="mb-4">Laravel 7 Yajra Datatables Example</h2> --}}
            <table class="table table-bordered yajra-datatable">
                <thead>
                    <tr>
                        <th>No</th>
                        <th>Name</th>
                        <th>Project Address</th>
                        <th>Owner</th>
                        <th>Contractor</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </div>
    </div>
...

It all works well except that my ACTION column displays "@CSRF" and "@METHOD" and my links don't work.

I can't understand what i'm doing wrong.

Oct
26
4 months ago
Activity icon

Replied to How Do I Query Through Many-to-Many?

@michaloravec Wow.. that is a wild query for me to interpret! Thanks.!

Activity icon

Replied to How Do I Query Through Many-to-Many?

@michaloravec @talinon How would I go about integrating that solution?

something like this? maybe?:

            $contacts = Contact::whereHas('roles', function ($query) {
                $query->where('id', 5);
            })->get();
            $data = $contacts->select("id", "company_id", "first_name", "last_name")
                ->where('first_name', 'LIKE', "%$search%")
                ->orWhere('last_name', 'LIKE', "%$search%")
                ->get();
Activity icon

Started a new Conversation How Do I Query Through Many-to-Many?

In my Contact.php I have the relationship defined as:

...
    public function roles()
    {
        return $this->belongsToMany('App\Models\contact\ContactRole');
    }
...

in my controller, I have this query:

...
            $data = Contact::select("id", "company_id", "first_name", "last_name")
                ->where('first_name', 'LIKE', "%$search%")
                ->orWhere('last_name', 'LIKE', "%$search%")
                ->get();
...

and I'm trying to get Contacts that have a roles()->where('id', 5)

My roles table has two column, 'id' and 'name'. Should I not be using the id to search and instead look for the matching name column? Pivots are so confusing to me. The matching name to 'id' record 5 is 'PM Contact'. I wonder if I should be trying to match that instead of the id. Help!

Edit: Normally I'd google it, but trying to query google for "laravel with examples" get me example sof laravel not specifically the "with" statements.

Oct
23
4 months ago
Activity icon

Replied to How To Concatenate Two Fields?

OMG! This is awesome!!! I'm gonna have to name my kids after you guys. Tykus Sinnbeck $lastname

Activity icon

Replied to How To Concatenate Two Fields?

When I'm typing a name in the box it says the results cannot be loaded.

Activity icon

Replied to How To Concatenate Two Fields?

hmm that doesn't seem to work for me. I added it to my model:

class Contact extends Model
{
    protected $fillable = [
        'company_id',
        'first_name',
        'last_name',
        'title',
        'email',
        'phone',
        'ext',
        'estimate_email',
        'notes',
        'project_assignment',
        'active',
    ];

    public function roles()
    {
        return $this->belongsToMany('App\Models\contact\ContactRole');
    }

    public function company()
    {
        return $this->hasOne('App\Models\contact\Company', 'id', 'company_id');
    }

    protected $appends = ['company_name'];
    public function getCompanyNameAttribute()
    {
        return $this->company->name;
    }
}

And used this:

<script type="text/javascript">
    $('.searchcontractor').select2({
      placeholder: 'Select an item',
      ajax: {
        url: '/project/searchcontractor',
        dataType: 'json',
        delay: 250,
        processResults: function (data) {
          return {
            results:  $.map(data, function (item) {
                  return {
                      text: item.first_name + ' ' + item.last_name + ' ' + item.company_name,
                      id: item.id
                  }
              })
          };
        },
        cache: true
      }
    });
</script>

what am I not considering?

Activity icon

Replied to How To Concatenate Two Fields?

How can I display attribute fields in my script. For example in my model I have this:

    public function company()
    {
        return $this->hasOne('App\Models\contact\Company', 'id', 'company_id');
    }

    public function getCompanyNameAttribute()
    {
        return $this->company->name;
    }

This is what I'm currenty trying and failing at:

<script type="text/javascript">
    $('.searchcontractor').select2({
      placeholder: 'Select an item',
      ajax: {
        url: '/project/searchcontractor',
        dataType: 'json',
        delay: 250,
        processResults: function (data) {
          return {
            results:  $.map(data, function (item) {
                  return {
                      text: item.first_name + ' ' + item.last_name + ' ' + item.CompanyName,
                      id: item.id
                  }
              })
          };
        },
        cache: true
      }
    });
</script>

My search route in my controller looks like this:

    public function searchcontractor(Request  $request)
    {
        $data = [];
        if ($request->has('q')) {
            $search = $request->q;
            $data = Contact::select("id", "first_name", "last_name")
                ->where('first_name', 'LIKE', "%$search%")
                ->orWhere('last_name', 'LIKE', "%$search%")
                ->get();
        }

        return response()->json($data);
    }
Activity icon

Started a new Conversation How To Concatenate Two Fields?

This is what I have now:

<script type="text/javascript">
    $('.searchcontractor').select2({
      placeholder: 'Select an item',
      ajax: {
        url: '/project/searchcontractor',
        dataType: 'json',
        delay: 250,
        processResults: function (data) {
          return {
            results:  $.map(data, function (item) {
                  return {
                      text: item.first_name,
                      id: item.id
                  }
              })
          };
        },
        cache: true
      }
    });
</script>

and this is what I'm tring to do:

                  return {
                      text: item.first_name.' '.item.last_name,
                      id: item.id
                  }

my php skills really do not help me with Javascript. :-(

Activity icon

Replied to How Do I Get More Than One Field Returned On Typeahead Searching?

Select2 is working really well.. I just need to figure out how to show both first and last names.

this is what I'm using:

<script type="text/javascript">
    $('.searchcontractor').select2({
      placeholder: 'Select an item',
      ajax: {
        url: '/project/searchcontractor',
        dataType: 'json',
        delay: 250,
        processResults: function (data) {
          return {
            results:  $.map(data, function (item) {
                  return {
                      text: item.first_name,
                      id: item.id
                  }
              })
          };
        },
        cache: true
      }
    });
</script>

and this is what i'm trying to do but not working:

                  return {
                      text: item.first_name.' '.item.last_name,
                      id: item.id
                  }
Activity icon

Started a new Conversation How Do I Get More Than One Field Returned On Typeahead Searching?

I've followed the guide below: https://appdividend.com/2018/04/27/laravel-typeahead-search-tutorial-with-example/

However, I want to show a field called first_name and last_name as they type. I also want to the search to match either first or last name.

I'm think I have the search figured out:

    public function result(Request  $request)
    {
        $result=Contact::
        where('first_name', 'LIKE', "%{$request->input('query')}%")
        ->orWhere('last_name', 'LIKE',  "%{$request->input('query')}%")
        ->get();
        return response()->json($result);
    }

but I'm still only getting first name showing in the result.

I also want the value of the chosen record be the ID field. I'm switching from dropdown select fields to typeahead serches.

                <div class="component-container form-group">
                    <label for="contractor_id">
                        Contractor
                    </label>
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <span class="input-group-text">
                                <i class="fas fa-hard-hat"></i>
                            </span>
                        </div>
                        {{-- <select id="contractor_id" class="component form-control" name="contractor_id" required>
                            <option>
                                Pick a General Contractor....
                            </option>
                            @foreach ($project_managers->contacts as $contact)
                            <option value="{{$contact->id}}">
                                {{$contact->first_name}} {{$contact->last_name}} - {{$contact->company->name}}
                            </option>
                            @endforeach
                        </select> --}}
                        <input type="number" class="form-control" id="search" name="contractor_id">
                    </div>
                </div>

If you know of a helper or packagist plugin that might make this transition easier for me, any suggestions would be appreciated.

Oct
22
4 months ago
Activity icon

Replied to Acquiring The Location From Mobile Or Web Browser

Thanks for pointing me in the right direction!

Activity icon

Started a new Conversation Acquiring The Location From Mobile Or Web Browser

I wanted to write an app that had a location component. How would I best go about it? What are the recommended plugins I should use? Is this even possible with Laravel?

I'm trying to get functionality similar to facebook marketplace that allows you to see ads within 100km of your location.

Oct
08
4 months ago
Activity icon

Started a new Conversation Blade File Best Practices?

I've heard you are supposed to do all your logic in the controller and minimal in your blade. I have sort of a conundrum as I have two different bill types that use the same model and DBtable but different need to be displayed differently with the SHOW function.

Right now I have a whole bunch of IF statements to include or exclude the things I need to show depending on the type of bill it is. So you can imagine how complicated that blade file is.

Should I be making separate SHOW blades for each type, directing the function to the separate show files and making includes for those snippets they have in common?

Sep
29
4 months ago
Activity icon

Replied to How Do You Cycle Through A Set Of Numbers Though A Relationship

That was awesome!!! Pure genius.. Thanks!

Activity icon

Started a new Conversation How Do You Cycle Through A Set Of Numbers Though A Relationship

I'm to test for an amount at the end of various fields: So instead of writing it out manually for each cost code like this:

            if ($budget->estimate->CCTotal0001) {
                $budgetitem = new BudgetItem;
                $budgetitem->budget_id = $budget->id;
                $budgetitem->code = 1;
                $budgetitem->save();
            }

            if ($budget->estimate->CCTotal0100) {
                $budgetitem = new BudgetItem;
                $budgetitem->budget_id = $budget->id;
                $budgetitem->code = 100;
                $budgetitem->save();
            }

I'm trying a shortcut. I created a DB with an entry called 'code' for each costcode. However I'm using integer field and 0001 get recorded as 1 and so on. So I'm using substr to change it over but I don;t know how to tie it in.

        foreach (CostCode::all() as $costcode) {
            if ($budget->estimate->CCTotal substr("0000{$costcode->code}", -4)) {
                $budgetitem = new BudgetItem;
                $budgetitem->budget_id = $budget->id;
                $budgetitem->code = $costcode->code;
                $budgetitem->save();
            }
        }

Could someone lend a hand?

Sep
25
5 months ago
Activity icon

Started a new Conversation Multi-Tenant Package Recommendation

I've kinda coded my own multi-tenancy solutions in the past and it's been really great in some cases and others not so great.

However, so much of this code is now standard fare and available as a plugin. I'm porting my code to a standardized solution.

I discovered tenancy.dev put out one, but can't seem to find others. Are they the only one putting out a package or are there others?

Sep
15
5 months ago
Activity icon

Replied to Logic Exception

Yeh, I don't think I'm using any api requests for anything at the moment.. so I'll probably delete it.

Activity icon

Replied to Logic Exception

Yeah! I think that is where it's at:

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});
Activity icon

Replied to Logic Exception

Yes, I think it's happening when caching routes.. It's part of my update script.

Activity icon

Replied to Logic Exception

My routes look like this:

<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

// Auth::routes();
Auth::routes(['register' => false]);

Route::get('/', '[email protected]')->name('home');
Route::get('/home', '[email protected]')->name('home');

//Material Related Routes
Route::resource('material/profile', 'material\ProfileController');
Route::resource('material/vbarrierprod', 'material\VbarrierProdController');
Route::resource('material/insulationprod', 'material\InsulationProdController');
Route::resource('material/insupinprod', 'material\InsuPinProdController');
Route::resource('material/primerprod', 'material\PrimerprodController');
Route::resource('material/subgirtprod', 'material\SubgirtProdController');
Route::resource('setup/contractor', 'setup\ContractorController');
Route::resource('setup/vendor', 'setup\VendorController');

// Adding Jobs
Route::get('estimate/{estimate}/recalc', 'estimate\[email protected]')
    ->name('estimate.recalc');
Route::resource('estimate', 'estimate\EstimateController');
//For making Predefined Wall Types.
Route::resource('estimate.walltype', 'estimate\walltype\WallTypeController');
//For adding insulation to Predefined Wall Types.
Route::resource('estimate.walltype.insulation', 'estimate\walltype\WalltypeInsulationController');
//For adding vbarrier to Predefined Wall Types.
Route::resource('estimate.walltype.vbarrier', 'estimate\walltype\WalltypeVbarrierController');
//For adding subgirt to Predefined Wall Types.
Route::resource('estimate.walltype.subgirt', 'estimate\walltype\WalltypeSubgirtController');
//For adding sections to jobs
Route::get('estimate/{estimate}/section/{section}/recalc', 'estimate\[email protected]')
    ->name('section.recalc');
Route::resource('estimate.section', 'estimate\SectionController');
//For adding cladding to sections
Route::get(
    'estimate/{estimate}/section/{section}/cladding/createfromwalltype',
    'estimate\[email protected]'
)
    ->name('estimate.section.cladding.createfromwalltype');
Route::post(
    'estimate/{estimate}/section/{section}/cladding/storefromwalltype',
    'estimate\[email protected]'
)
    ->name('estimate.section.cladding.storefromwalltype');
Route::resource('estimate.section.cladding', 'estimate\CladdingController');
//For adding vapor barriers to cladding
Route::resource('estimate.section.cladding.vbarrier', 'estimate\VbarrierController');
//For adding insulation to cladding
Route::resource('estimate.section.cladding.insulation', 'estimate\InsulationController');
//For adding subgirt to cladding
Route::resource('estimate.section.cladding.subgirt', 'estimate\SubgirtController');
//This is more like a pivot table
Route::resource('estimate.estimatecontractor', 'estimate\EstimateContractorController');
Route::resource('estimate.detail', 'estimate\DetailController'); //Adding Details to Job

Route::get('estimate/{estimate}/detail/{detail}/trim/add-custom', 'estimate\[email protected]')
    ->name('trim.createcustom'); //Adding Custom Trim
Route::resource('estimate.detail.trim', 'estimate\TrimController'); //Adding trim to Details

Route::get('/estimate/getpdf/{estimate}', 'estimate\[email protected]')
    ->name('create.estimate-pdf');
Route::get('/estimate/getprintview/{estimate}', 'estimate\[email protected]')
    ->name('estimate.printview');

Route::post('/estimate/uploadafile', 'estimate\[email protected]')
    ->name('estimate.uploadafile');
Route::delete('/estimate/deleteafile/{token}', 'estimate\[email protected]')
    ->name('estimate.deleteafile');

Route::post('/estimate/detail/uploadafile', 'estimate\[email protected]')
    ->name('detail.uploadanimage');
Route::delete('/estimate/detail/deleteafile/{token}', 'estimate\[email protected]')
    ->name('detail.deleteanimage');

Route::resource('/estimate/equipment', 'estimate\EquipmentController');
Route::get('/estimate/equipment/create-equipment/{token}', 'estimate\[email protected]')
    ->name('equipment.createequip');

Route::resource('/estimate/freight', 'estimate\FreightController');
Route::get('/estimate/freight/create-freight/{token}', 'estimate\[email protected]')
    ->name('freight.createfreight');



//Project Related
Route::get('project/{project}/filemanager', 'project\[email protected]')
    ->name('project.filemanager'); // filemanager
Route::resource('project', 'project\ProjectController'); // Project Crud

//Budget Related
Route::resource('project.budget', 'project\BudgetController'); // Budget Crud

// Bill related
Route::post('project.bill.uploadafile', 'project\bill\[email protected]')
    ->name('bill.uploadafile');
Route::delete('project.bill.deleteafile/{token}', 'project\bill\[email protected]')
    ->name('bill.deleteafile');
Route::get('project/{project}/bill/createpb', 'project\bill\[email protected]')
    ->name('project.bill.createpb');
Route::get('project/{project}/bill/{bill}/approve', 'project\bill\[email protected]')
    ->name('project.bill.approve');
Route::get('project/{project}/bill/{bill}/unapprove', 'project\bill\[email protected]')
    ->name('project.bill.unapprove');
Route::get('project/{project}/bill/{bill}/createqbinvoice', 'project\bill\[email protected]')
    ->name('project.bill.createqbinvoice');
Route::resource('project.bill', 'project\bill\BillController'); // Bill Crud
Route::resource('project.bill.billitem', 'project\bill\BillItemController'); // BillItem Crud
Route::resource('project.bill.bcoitem', 'project\bill\BCOItemController'); // BCOItem Crud
Route::resource('project.bill.billrev', 'project\bill\BillRevController'); // BillRev Crud

//Change Order Related
Route::post(
    'project.changeorder.uploadafile',
    'project\changeorder\[email protected]'
)
    ->name('project.changeorder.uploadafile');
Route::delete(
    'project.changeorder.deleteafile/{token}',
    'project\changeorder\[email protected]'
)
    ->name('project.changeorder.deleteafile');
Route::get(
    'project/{project}/changeorder/{changeorder}/approve',
    'project\changeorder\[email protected]'
)
    ->name('project.changeorder.approve');
Route::get(
    'project/{project}/changeorder/{changeorder}/unapprove',
    'project\changeorder\[email protected]'
)
    ->name('project.changeorder.unapprove');
Route::resource('project.changeorder', 'project\changeorder\ChangeOrderController'); // ChangeOrder Crud
Route::resource('project.changeorder.coitem', 'project\changeorder\CoItemController'); // Change Order line Item Crud
Route::resource('project.changeorder.corev', 'project\changeorder\CoRevController'); // BillRev Crud

/* Purchase Order Retlated */
Route::post(
    'project.purchaseorder.uploadafile',
    'project\purchaseorder\[email protected]'
)
    ->name('project.purchaseorder.uploadafile');
Route::delete(
    'project.purchaseorder.deleteafile/{token}',
    'project\purchaseorder\[email protected]'
)
    ->name('project.purchaseorder.deleteafile');
Route::get(
    'project/{project}/purchaseorder/{purchaseorder}/approve',
    'project\purchaseorder\[email protected]'
)
    ->name('project.purchaseorder.approve');
Route::get(
    'project/{project}/purchaseorder/{purchaseorder}/unapprove',
    'project\purchaseorder\[email protected]'
)
    ->name('project.purchaseorder.unapprove');
Route::resource('project.purchaseorder', 'project\purchaseorder\PurchaseOrderController'); /* PurchaseOrder Crud */
Route::resource('project.purchaseorder.porev', 'project\purchaseorder\PoRevController'); /* PoRev Crud */
Route::resource('project.purchaseorder.poitem', 'project\purchaseorder\PoItemController'); /* PO line Item Crud */

/* RFI related */
Route::resource('project.rfi', 'project\rfi\RFIController'); /* RFI Crud */



/* Company Profile and Contact */
Route::resource('company', 'contact\CompanyController'); // Company Crud
Route::resource('company.contact', 'contact\ContactController'); // Contact Crud

Route::group(['prefix' => 'filemanager', 'middleware' => ['web', 'auth']], function () {
    \UniSharp\LaravelFilemanager\Lfm::routes();
});


Route::get('generator_builder', '\InfyOm\GeneratorBuilder\Controllers\[email protected]')
    ->name('io_generator_builder');

Route::get('field_template', '\InfyOm\GeneratorBuilder\Controllers\[email protected]')
    ->name('io_field_template');

Route::get(
    'relation_field_template',
    '\InfyOm\GeneratorBuilder\Controllers\[email protected]'
)
    ->name('io_relation_field_template');

Route::post('generator_builder/generate', '\InfyOm\GeneratorBuilder\Controllers\[email protected]')
    ->name('io_generator_builder_generate');

Route::post('generator_builder/rollback', '\InfyOm\GeneratorBuilder\Controllers\[email protected]')
    ->name('io_generator_builder_rollback');

Route::post(
    'generator_builder/generate-from-file',
    '\InfyOm\GeneratorBuilder\Controllers\[email protected]'
)->name('io_generator_builder_generate_from_file');

Activity icon

Started a new Conversation Logic Exception

When I run my migrations i get an error for an entry in my routes, but I can't quite figure out what is wrong. Everything continues to work as it should.


   LogicException 

  Unable to prepare route [api/user] for serialization. Uses Closure.

  at vendor/laravel/framework/src/Illuminate/Routing/Route.php:1150
    1146|      */
    1147|     public function prepareForSerialization()
    1148|     {
    1149|         if ($this->action['uses'] instanceof Closure) {
  > 1150|             throw new LogicException("Unable to prepare route [{$this->uri}] for serialization. Uses Closure.");
    1151|         }
    1152| 
    1153|         $this->compileRoute();
    1154| 

      +15 vendor frames 
  16  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

it seems the offending value is this:

Auth::routes(['register' => false]);

Sep
14
5 months ago
Activity icon

Replied to Upgrade From 6 To 7 Failed

Yeah,, I read your message went to the github repo for laravel 7 and pulled a fresh version of that file.

Activity icon

Replied to Upgrade From 6 To 7 Failed

It still failed. I got this:

$ rm -r vendor
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 130 installs, 0 updates, 0 removals
  - Installing voku/portable-ascii (1.5.3): Loading from cache
  - Installing symfony/polyfill-ctype (v1.18.1): Loading from cache
  - Installing phpoption/phpoption (1.7.5): Loading from cache
  - Installing vlucas/phpdotenv (v4.1.8): Loading from cache
  - Installing symfony/css-selector (v5.1.5): Loading from cache
  - Installing tijsverkoyen/css-to-inline-styles (2.2.3): Loading from cache
  - Installing symfony/polyfill-php80 (v1.18.1): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.18.1): Loading from cache
  - Installing symfony/var-dumper (v5.1.5): Loading from cache
  - Installing symfony/deprecation-contracts (v2.2.0): Loading from cache
  - Installing symfony/routing (v5.1.5): Loading from cache
  - Installing symfony/process (v5.1.5): Loading from cache
  - Installing symfony/polyfill-php72 (v1.18.1): Loading from cache
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing symfony/polyfill-php70 (v1.18.1): Loading from cache
  - Installing symfony/polyfill-intl-normalizer (v1.18.1): Loading from cache
  - Installing symfony/polyfill-intl-idn (v1.18.1): Loading from cache
  - Installing symfony/mime (v5.1.5): Loading from cache
  - Installing symfony/polyfill-intl-grapheme (v1.18.1): Loading from cache
  - Installing symfony/string (v5.1.5): Loading from cache
  - Installing phpdocumentor/reflection-common (2.2.0): Loading from cache
  - Installing webmozart/assert (1.9.1): Loading from cache
  - Installing phpdocumentor/type-resolver (1.3.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (5.2.1): Loading from cache
  - Installing psr/log (1.1.3): Loading from cache
  - Installing symfony/polyfill-php73 (v1.18.1): Loading from cache
  - Installing symfony/http-foundation (v5.1.5): Loading from cache
  - Installing psr/event-dispatcher (1.0.0): Loading from cache
  - Installing symfony/event-dispatcher-contracts (v2.2.0): Loading from cache
  - Installing symfony/event-dispatcher (v5.1.5): Loading from cache
  - Installing symfony/error-handler (v5.1.5): Loading from cache
  - Installing symfony/http-kernel (v5.1.5): Loading from cache
  - Installing symfony/finder (v5.1.5): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/service-contracts (v2.2.0): Loading from cache
  - Installing symfony/console (v5.1.5): Loading from cache
  - Installing symfony/polyfill-iconv (v1.18.1): Loading from cache
  - Installing doctrine/lexer (1.2.1): Loading from cache
  - Installing egulias/email-validator (2.1.20): Loading from cache
  - Installing swiftmailer/swiftmailer (v6.2.3): Loading from cache
  - Installing brick/math (0.9.1): Loading from cache
  - Installing ramsey/collection (1.1.1): Loading from cache
  - Installing ramsey/uuid (4.1.1): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing opis/closure (3.5.7): Loading from cache
  - Installing symfony/translation-contracts (v2.2.0): Loading from cache
  - Installing symfony/translation (v5.1.5): Loading from cache
  - Installing nesbot/carbon (2.39.2): Loading from cache
  - Installing monolog/monolog (2.1.1): Loading from cache
  - Installing league/mime-type-detection (1.4.0): Loading from cache
  - Installing league/flysystem (1.1.3): Loading from cache
  - Installing league/commonmark (1.5.5): Loading from cache
  - Installing dragonmantank/cron-expression (v2.3.0): Loading from cache
  - Installing doctrine/inflector (2.0.3): Loading from cache
  - Installing laravel/framework (v7.28.1): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Loading from cache
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing guzzlehttp/psr7 (1.6.1): Loading from cache
  - Installing intervention/image (2.5.1): Loading from cache
  - Installing unisharp/laravel-filemanager (v2.1.0): Loading from cache
  - Installing sabberworm/php-css-parser (8.3.1): Loading from cache
  - Installing phenx/php-svg-lib (v0.3.3): Loading from cache
  - Installing phenx/php-font-lib (0.5.2): Loading from cache
  - Installing dompdf/dompdf (v0.8.6): Loading from cache
  - Installing barryvdh/laravel-dompdf (v0.8.7): Loading from cache
  - Installing balping/json-raw-encoder (v1.0.1): Loading from cache
  - Installing consoletvs/charts (6.5.5): Loading from cache
  - Installing fideloper/proxy (4.4.0): Loading from cache
  - Installing almasaeed2010/adminlte (v3.0.5): Loading from cache
  - Installing jeroennoten/laravel-adminlte (v3.4.4): Loading from cache
  - Installing dnoegel/php-xdg-base-dir (v0.1.1): Loading from cache
  - Installing nikic/php-parser (v4.9.1): Loading from cache
  - Installing psy/psysh (v0.10.4): Loading from cache
  - Installing laravel/tinker (v2.4.2): Loading from cache
  - Installing laravel/ui (v2.4.0): Loading from cache
  - Installing laravelcollective/html (v6.2.0): Loading from cache
  - Installing okipa/laravel-html-helper (1.4.0): Loading from cache
  - Installing okipa/laravel-bootstrap-components (2.2.3): Loading from cache
  - Installing orangehill/iseed (v2.6.4): Loading from cache
  - Installing quickbooks/v3-php-sdk (5.4.3): Loading from cache
  - Installing spinen/laravel-quickbooks-client (4.0.3): Loading from cache
  - Installing doctrine/event-manager (1.1.1): Loading from cache
  - Installing doctrine/cache (1.10.2): Loading from cache
  - Installing doctrine/dbal (2.10.4): Loading from cache
  - Installing symfony/filesystem (v5.1.5): Loading from cache
  - Installing seld/phar-utils (1.1.1): Loading from cache
  - Installing seld/jsonlint (1.8.2): Loading from cache
  - Installing justinrainbow/json-schema (5.2.10): Loading from cache
  - Installing composer/xdebug-handler (1.4.3): Loading from cache
  - Installing composer/spdx-licenses (1.5.4): Loading from cache
  - Installing composer/ca-bundle (1.2.8): Loading from cache
  - Installing composer/semver (1.7.0): Loading from cache
  - Installing composer/composer (1.10.13): Loading from cache
  - Installing barryvdh/reflection-docblock (v2.0.6): Loading from cache
  - Installing barryvdh/laravel-ide-helper (v2.8.1): Loading from cache
  - Installing scrivo/highlight.php (v9.18.1.2): Loading from cache
  - Installing filp/whoops (2.7.3): Loading from cache
  - Installing facade/ignition-contracts (1.0.1): Loading from cache
  - Installing facade/flare-client-php (1.3.5): Loading from cache
  - Installing facade/ignition (2.3.7): Loading from cache
  - Installing fzaninotto/faker (v1.9.1): Loading from cache
  - Installing laracasts/generators (1.2.0): Loading from cache
  - Installing hamcrest/hamcrest-php (v2.0.1): Loading from cache
  - Installing mockery/mockery (1.4.2): Loading from cache
  - Installing nunomaduro/collision (v4.2.0): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/type (1.1.3): Loading from cache
  - Installing sebastian/resource-operations (2.0.1): Loading from cache
  - Installing sebastian/recursion-context (3.0.0): Loading from cache
  - Installing sebastian/object-reflector (1.1.1): Loading from cache
  - Installing sebastian/object-enumerator (3.0.3): Loading from cache
  - Installing sebastian/global-state (3.0.0): Loading from cache
  - Installing sebastian/exporter (3.1.2): Loading from cache
  - Installing sebastian/environment (4.2.3): Loading from cache
  - Installing sebastian/diff (3.0.2): Loading from cache
  - Installing sebastian/comparator (3.0.2): Loading from cache
  - Installing phpunit/php-timer (2.1.2): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing phpunit/php-file-iterator (2.0.2): Loading from cache
  - Installing theseer/tokenizer (1.2.0): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-token-stream (3.1.1): Loading from cache
  - Installing phpunit/php-code-coverage (7.0.10): Loading from cache
  - Installing doctrine/instantiator (1.3.1): Loading from cache
  - Installing phpspec/prophecy (1.11.1): Loading from cache
  - Installing phar-io/version (2.0.1): Loading from cache
  - Installing phar-io/manifest (1.0.3): Loading from cache
  - Installing myclabs/deep-copy (1.10.1): Loading from cache
  - Installing phpunit/phpunit (8.5.8): Loading from cache
  - Installing squizlabs/php_codesniffer (3.5.6): Loading from cache
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/event-dispatcher suggests installing symfony/dependency-injection
symfony/http-kernel suggests installing symfony/browser-kit
symfony/http-kernel suggests installing symfony/config
symfony/http-kernel suggests installing symfony/dependency-injection
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/lock
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
ramsey/uuid suggests installing ext-bcmath (Enables faster math with arbitrary-precision integers using BCMath.)
ramsey/uuid suggests installing ext-gmp (Enables faster math with arbitrary-precision integers using GMP.)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
ramsey/uuid suggests installing paragonie/random-lib (Provides RandomLib for use with the RandomLibAdapter)
symfony/translation suggests installing symfony/config
symfony/translation suggests installing symfony/yaml
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver))
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library))
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
laravel/framework suggests installing ext-redis (Required to use the Redis cache and queue drivers (^4.0|^5.0).)
laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).)
laravel/framework suggests installing guzzlehttp/guzzle (Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0).)
laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
laravel/framework suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).)
laravel/framework suggests installing nyholm/psr7 (Required to use PSR-7 bridging features (^1.2).)
laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^4.0).)
laravel/framework suggests installing predis/predis (Required to use the predis connector (^1.1.2).)
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^4.0).)
laravel/framework suggests installing symfony/cache (Required to PSR-6 cache bridge (^5.0).)
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use PSR-7 bridging features (^2.0).)
laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
intervention/image suggests installing ext-imagick (to use Imagick based image processing.)
intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)
unisharp/laravel-filemanager suggests installing ext-imagick (to use Imagick based image processing.)
dompdf/dompdf suggests installing ext-imagick (Improves image processing performance)
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
quickbooks/v3-php-sdk suggests installing guzzlehttp/guzzle (Uses Guzzle to make HTTP Requests)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
composer/composer suggests installing ext-zip (Enabling the zip extension allows you to unzip archives)
barryvdh/reflection-docblock suggests installing dflydev/markdown (~1.0)
barryvdh/reflection-docblock suggests installing erusev/parsedown (~1.0)
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
facade/ignition suggests installing laravel/telescope (^3.1)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0)
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Deprecation Notice: Class QuickBooksOnline\API\Data\IPPWrapper located in ./vendor/quickbooks/v3-php-sdk/src/Data/IPP.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in /usr/share/php/Composer/Autoload/ClassMapGenerator.php:201
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Fatal error:  Declaration of App\Exceptions\Handler::report(Exception $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::report(Throwable $e) in /home/xxx/LaravelRoot/app/app/Exceptions/Handler.php on line 35
PHP Stack trace:
PHP   1. {main}() /home/xxx/LaravelRoot/app/artisan:0
PHP   2. App\Console\Kernel->handle() /home/xxx/LaravelRoot/app/artisan:37
PHP   3. App\Console\Kernel->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:127
PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:310
PHP   5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:230
PHP   6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17
PHP   7. Illuminate\Foundation\ProviderRepository->load() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:604
PHP   8. Illuminate\Foundation\Application->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75
PHP   9. NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:627
PHP  10. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.php:72
PHP  11. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:781
PHP  12. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:637
PHP  13. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  14. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  15. Illuminate\Foundation\Application->Illuminate\Container\{closure:/home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:263-271}() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
PHP  16. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:269
PHP  17. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  18. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  19. ReflectionClass->__construct() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  20. spl_autoload_call() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  21. Composer\Autoload\ClassLoader->loadClass() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  22. Composer\Autoload\includeFile() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:322
PHP  23. include() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:444
PHP Fatal error:  Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
Stack trace:
#0 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(809): ReflectionClass->__construct()
#1 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build()
#2 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve()
#3 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(269): Illuminate\Foundation\Application->resolve()
#4 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->Illuminate\Container\{closure}()
#5 /home/xxx/LaravelRoot/app/vendor/larave in /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 811
PHP Stack trace:
PHP   1. {main}() /home/xxx/LaravelRoot/app/artisan:0
PHP   2. App\Console\Kernel->handle() /home/xxx/LaravelRoot/app/artisan:37
PHP   3. App\Console\Kernel->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:127
PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:310
PHP   5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:230
PHP   6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17
PHP   7. Illuminate\Foundation\ProviderRepository->load() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:604
PHP   8. Illuminate\Foundation\Application->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75
PHP   9. NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:627
PHP  10. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.php:72
PHP  11. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:781
PHP  12. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:637
PHP  13. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  14. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  15. Illuminate\Foundation\Application->Illuminate\Container\{closure:/home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:263-271}() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
PHP  16. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:269
PHP  17. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  18. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  19. ReflectionClass->__construct() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  20. spl_autoload_call() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  21. Composer\Autoload\ClassLoader->loadClass() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  22. Composer\Autoload\includeFile() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:322
PHP  23. include() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:444
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Activity icon

Started a new Conversation Upgrade From 6 To 7 Failed

I replaced the dependencies and did a composer update and got this:

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
PHP Fatal error:  Declaration of App\Exceptions\Handler::report(Exception $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::report(Throwable $e) in /home/xxx/LaravelRoot/app/app/Exceptions/Handler.php on line 35
PHP Stack trace:
PHP   1. {main}() /home/xxx/LaravelRoot/app/artisan:0
PHP   2. App\Console\Kernel->handle() /home/xxx/LaravelRoot/app/artisan:37
PHP   3. App\Console\Kernel->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:127
PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:310
PHP   5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:230
PHP   6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17
PHP   7. Illuminate\Foundation\ProviderRepository->load() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:604
PHP   8. Illuminate\Foundation\Application->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75
PHP   9. NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:627
PHP  10. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.php:72
PHP  11. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:781
PHP  12. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:637
PHP  13. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  14. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  15. Illuminate\Foundation\Application->Illuminate\Container\{closure:/home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:263-271}() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
PHP  16. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:269
PHP  17. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  18. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  19. ReflectionClass->__construct() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  20. spl_autoload_call() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  21. Composer\Autoload\ClassLoader->loadClass() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  22. Composer\Autoload\includeFile() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:322
PHP  23. include() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:444
PHP Fatal error:  Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
Stack trace:
#0 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(809): ReflectionClass->__construct()
#1 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(691): Illuminate\Container\Container->build()
#2 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve()
#3 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(269): Illuminate\Foundation\Application->resolve()
#4 /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): Illuminate\Container\Container->Illuminate\Container\{closure}()
#5 /home/xxx/LaravelRoot/app/vendor/larave in /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 811
PHP Stack trace:
PHP   1. {main}() /home/xxx/LaravelRoot/app/artisan:0
PHP   2. App\Console\Kernel->handle() /home/xxx/LaravelRoot/app/artisan:37
PHP   3. App\Console\Kernel->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:127
PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:310
PHP   5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:230
PHP   6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php:17
PHP   7. Illuminate\Foundation\ProviderRepository->load() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:604
PHP   8. Illuminate\Foundation\Application->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:75
PHP   9. NunoMaduro\Collision\Adapters\Laravel\CollisionServiceProvider->register() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:627
PHP  10. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/nunomaduro/collision/src/Adapters/Laravel/CollisionServiceProvider.php:72
PHP  11. Illuminate\Foundation\Application->make() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:781
PHP  12. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:637
PHP  13. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  14. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  15. Illuminate\Foundation\Application->Illuminate\Container\{closure:/home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:263-271}() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:805
PHP  16. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:269
PHP  17. Illuminate\Foundation\Application->resolve() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:796
PHP  18. Illuminate\Foundation\Application->build() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:691
PHP  19. ReflectionClass->__construct() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  20. spl_autoload_call() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  21. Composer\Autoload\ClassLoader->loadClass() /home/xxx/LaravelRoot/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:809
PHP  22. Composer\Autoload\includeFile() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:322
PHP  23. include() /home/xxx/LaravelRoot/app/vendor/composer/ClassLoader.php:444
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255

What am I doing wrong? The instructions on the upgrade page just say to replace dependencies in composer.json

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2",
        "barryvdh/laravel-dompdf": "^0.8.6",
        "consoletvs/charts": "6.*",
        "doctrine/dbal": "^2.10",
        "fideloper/proxy": "^4.0",
        "jeroennoten/laravel-adminlte": "^3.0",
        "laravel/framework": "^7.0",
        "laravel/tinker": "^2.0",
        "laravel/ui": "^2.4",
        "laravelcollective/html": "^6.0",
        "okipa/laravel-bootstrap-components": "^2.0",
        "orangehill/iseed": "^2.6",
        "spinen/laravel-quickbooks-client": "^4.0",
        "unisharp/laravel-filemanager": "^2.1"
    },
    "require-dev": {
        "barryvdh/laravel-ide-helper": "^2.7",
        "facade/ignition": "^2.0",
        "fzaninotto/faker": "^1.4",
        "laracasts/generators": "^1.1",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^4.1",
        "phpunit/phpunit": "^8.5",
        "squizlabs/php_codesniffer": "^3.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}