Member Since 5 Years Ago

Colorado Springs

Soldier in US Army at Colorado Springs

Experience Points 26,650
Experience Level 6

3,350 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 303
Best Reply Awards 17
Best Reply
  • start-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-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-token Created with Sketch.


    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.


    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

04 Sep
1 week ago

Tangente left a reply on XML To PDF

Use this package. It uses DomPDF, which in convert HTML to pdf. In Theory, it should deal with XML as well.


30 May
3 months ago

Tangente left a reply on HTTP Error Occurred During File Upload (404: File Not Found).

by the way, I do not see your input file in the html code.

It should be like this:

<input type="file" name="upload">

Tangente left a reply on How To Implement Payments Between Users, Patreon Like...

Were you able to find the answer to this? It's a good question

29 May
3 months ago

Tangente started a new conversation PHPUnit With Laravel 5.8

Trying to follow along https://laracasts.com/series/phpunit-testing-in-laravel series, with Laravel 5.8 but so far it's a nightmare. Functions like $this->visit(); nolonger exist. I found online I can use laravel/browser-kit-testing (v5.1.2), but this doesn't seem to work as well, complaining that:

ExampleTest contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Laravel\BrowserKitTesting\TestCase::createApplication)

Which I can obviously do, but that makes me modify that vendor code, and is not a good approach.

Any ideas?

Thank you

20 May
3 months ago

Tangente left a reply on Password Updating But Not Able To Login With New Password

Can you share your log in function?

19 Mar
5 months ago

Tangente left a reply on Issue Trying To Calculate Average With Javascript Method

Issue is here:

for(var i=0; i<= discountReviews.length; i++)

It should be

 for(var i=0; i<= discountReviews.length; i++)

It is failing on the last iteration

Tangente left a reply on How Can I Include Params On All Blades?

Instead of

Use App\Http\Controllers

Do instead

Use App\Http\Controllers\AssetsController

That way it knows where to find it

08 Mar
6 months ago

Tangente left a reply on Data From A Table Where Column 1 Equals To Column 2 Of The Same Row

Posts::whereRaw("name = author")->get();

Tangente left a reply on Syntax Error, Unexpected '{'

I don’t know how we didn’t catch that ?‍♂️

Tangente left a reply on C# Post Method Works On Localhost But Not On Shared Host Ask Question

The methodNotAllowed exception (405) indicates that a route doesn't exist for the HTTP method you are requesting. If that routes exist and works well on localhost, then your server (https://example.com) is not routing correctly. Which means your .htaccess is not behaving correctly

I would do all troubleshooting on .htaccess file. I see it looks a little different from what ships out with laravel.

Documentation says “ If the .htaccess file that ships with Laravel does not work with your Apache installation, try this one:“

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Tangente left a reply on How Many Droplets/DB Droplets Are Behind Laracasts?

Good question. I think only @jeffreyWay can answer that

Tangente left a reply on Making Files Downloadable Only After Purchase

In database, have a path to full mp3, just like you do for the sample one. Once the customer buys that ID, then redirect them to the page with full path.

Yes, stripe can handle all payment stuff, and once the payment succeeds then redirect them to page with full path of mo3

Tangente left a reply on Looking For Tutor/mentor Or Studybuddy

Good question. Are you going to pay them or it’s just a free tutor?

Tangente left a reply on Syntax Error, Unexpected '{'

Try this:

public function addProduct(Request $request)
            $data = $request->all();
            //echo "<pre>"; print_r($data); die;
                return redirect()->back()->with('flash_message_error','Under Category is mssing');
07 Mar
6 months ago

Tangente left a reply on Laravel Confirm Delete In An Alert In My View

Something like this...:

<a class="btn btn-danger" onclick="return confirm('Are you sure?')" href="{{route('users.delete', $user->id)}}"></a>

Tangente left a reply on Conditionally Bind Implementation To Interfaces

I would do this. After log in, do app(“MyClass”)= new MyClass();

I know that is not binding to interface as you want, but wouldn’t this work???

06 Mar
6 months ago

Tangente left a reply on Attach() On Custom BelongsToMany-Model

What’s the name of table that the model “Membership” is using?

I may be wrong, but I think if you are not specifying it’s name, Laravel will default to both model names together, and hence complaining that table folder_user doesn’t exist.

Make sure that in the model Membership you have this: protected $table = “membership'; (or however you choose to call it), that way laravel doesn’t assume table name to be folder_user

Tangente left a reply on Problem With Adding Image To Product

Lol !! The response above is....interesting

Tangente left a reply on UUID And Pivot Tables

I can’t follow that link, it goes to error 404. However...

That is definitely crashing because of your table structure. That trait simply checks, if you don’t have a primary key value set, then generates UUID and assigns to it. That being said, I think your tables has extra field “id “ that is required, but you are not passing a value to it.

Quick solution:

  1. make that “id” auto increment, that way you don’t have to worry about it, or
  2. make it not required or
  3. drop that column from pivot table

Unless I’m wrong and doesn’t have “id” column

Tangente left a reply on Submit Form With Sweet Alert

Sorry, I can’t test this on iPad. Btw, isn’t it supposed to be a comma instead of .”then” or it doesn’t matter? I was just reading about .swal, and it always use this “,function()”, not “.then(function()”, so that made me wonder if it matters. What happens if you change it to this:

    jQuery('button#verifyDoc').on('click', function(event ){
        title: "",
        text: "...",
        type: "info",
        showCancelButton: true,
            buttonsStyling: true,
        confirmButtonText: "ok",
        cancelButtonText: "cancel",
      }, function(isConfirm){

Tangente left a reply on Please Could Someone Help Me With This File Upload Problem

@riaanv1987 you getting that error after adding his changes, syntax error, because he forgot a parentheses here


Change that to


Tangente left a reply on Submit Form With Sweet Alert

In that case, I think the problem is how you are making JQuery selection. That jquery code is not being executed. Debug like this:

jQuery('button#verifyDoc').on('click', function(event ){ alert(“hello there “);

And try. If the alert doesn’t go, Then I am right.

In your html, change the button to this < input type=“button” id =“verifyDoc” .......

Then jquery, do this instead

jQuery('#verifyDoc').on('click', function(event ){ event.pre entDefault();

Tangente left a reply on Submit Form With Sweet Alert

You have to tell the event to prevent default action. By clicking, default is submitting. So pass event in that function, and add this:

. click(function( event ) { //pass the event in there

// then add


Something like that

Tangente left a reply on Completion Percentage Based On Time, Not On Quantity

I personally don’t care how far I’m in series in terms of percentage, but I guess some people really care about it.

I guess @JeffreyWay should look into it.

I do agree with you though, it’s not accurate. You can watch 1 quick introduction video while the other one is long ass 30 minutes and it tells you you are 50% done while it’s not even close.

Tangente left a reply on How To Get The Accordion To Open Or Close Depending If There Is An Error

This is how I would do this. Create another partial, and have a conditional JavaScript . I’m assuming you are using JQuerry accordion? Anyhow, in my accordion.blade.php, I’d have this:

@ if($errors->business_errors->any()) < script type=“javascript >

$( ".accordion" ).accordion( "option", "active", 1 ); // your selector class is called “accordion” in the code. < /script >

@ endif

Then in your blade just include it anywhere include(‘accordion’) Something like that.

This is probably not the most elegant solution to this because we are mixing javascript with php code, but oh well, it should do if you go that route


Tangente left a reply on 400 Bad Request In Method DELETE And PATCH

Correct me if I am wrong, but in theory it shouldn’t be working in localhost too. Ajax has only 2 types, POST and GET. Those laravel methods, PATCH, DELETE are handled by doing what’s called Method Spoofing behind the scene. Anyhow, for Ajax try this:

< input type="hidden" name="_method" value="PATCH" > or < input type="hidden" name="_method" value="DELETE" > and see if that works. Sorry I can’t try it on iPad :)

05 Mar
6 months ago

Tangente left a reply on Select Users Based On User ID

There are a few ways you can solve this.

What I would do is only pass the $users arrays. So, in controller, check If the $user has ID=1, then get users whose ID type is 2. Like, $users=User::where(‘typeID’,1); if your user type ID is 2, then make $users=User::where(‘TypeID’,2);

Then pass $users variable to the view.

In the view, get rid of @elseif entirely.

Tangente left a reply on 419 Error Found When Deploy App To Product Server

Error 419 is usually the issue of CSRF. If it’s working on local server but not on production, make sure sessions are being set correctly. Also, sometimes the issue is that your permission is not set correctly, therefore no “write “ permission. Try and change permission to 777 on production, storage folder. Like this:

chmod -R 777 storage

Tangente left a reply on Saving Created Image

You can save the image using the same function, but passing second parameter of path where you want the image to be saved at. Something like this:

$path = "storage/app/public/alkali/myImage.png"; imagepng($my_img, $path);//by providing the path, it saves it to file instead of displaying it

Tangente left a reply on Select Users Based On User ID

What’s not working? According to your code, if you are passing $users array, then make a drop down, otherwise if you have just one user, make a text field. It seems like this logic would work, as long as you are passing those variables to blade.

What’s the results are you getting?

01 Mar
6 months ago

Tangente left a reply on Searching Multiple Fields Over Multiple Tables

@sabbir345 , what do you mean by not working properly. I am assuming you have two variables, $name=$request("name"); $prescription=$request("prescription"); or something like that and then you do the queries?

28 Feb
6 months ago

Tangente left a reply on Callback / Anonymous Functions

To be honest, I don’t see an issue either. Can you do a little debugging? Put dd($query); right before returning it so we know where the issue is happening at?

Tangente left a reply on Displaying Image

Something like this:

’ img src=“public/images/“.{{$user->id}}.”.jpg”

‘ In this case I assumed id is user id from database

Tangente left a reply on Why Can't Set Custom Message With Abort()

You should be able to.

Make sure your error views (404.blade.php, or 500.blade.php) were not modified. 404.blade.php should look like this for instance:


Tangente left a reply on Form Doesn't Get Values

For each input, you have to give it a name parameter. Like : ‘’’ input name=“brandName”

08 Jan
8 months ago

Tangente left a reply on Migration Refresh: Cannot Delete Or Update A Parent Row: A Foreign Key Constraint Fails

Reverse the order of drop, like this:


public function down()


You have to delete child table before you can delete the parent, that’s why it’s failing

Tangente left a reply on Zip Request Files

save those files then before zipping them, something like this;

 $files = $request->file('files');
  $savedFiles = {};
    Foreach ($files as $file) {
        $extension = $file->getClientOriginalExtension();
        $storage = '/app/files/';
        $fileName = $storage . str_random(100) . $file->getFilename() . '.' . $extension;
        $file->move(storage_path() . $storage, $fileName);

Later on then zip them ;


07 Jan
8 months ago

Tangente left a reply on Zip Request Files

  1. get files from request:

$files=$request[“files”];// this is an array of files

  1. zip the files and move zip to storage


//now save that zip file to database for whoever will need to download it.

What couldn’t work when you tried that method?

That package is one of many packages that can do this. You can add or remove files and zip them


Tangente left a reply on Update One To Many

What does this return?


Because your loop keeps updating that on every iteration

Tangente left a reply on Update Some Attributes And Do Not Fire Saving Events

I may be wrong, but I think those model events will always fire, like saving, creating, etc . You can’t stop them from firing, but you can decide on how you listen to them and handle them though. I suggest you add the logic in the handler method, like

Public function saving(Product $product) { If( $product->estimated_fee ) { //do your code here }

Tangente left a reply on Update One To Many

What’s wrong with your update function? It doesn’t work or you need a better solution? Usually sync functions works better for one to many relationships, like this:

$invoice -> reports() -> sync($request -> reports);

Something like that

06 Jan
8 months ago

Tangente left a reply on Universal (database) GroupBy Formatted Date

I answered a question like this earlier

Try this method:

use Carbon\Carbon; $latest = Site::query() ->with('upvotes') ->orderBy('created_at', 'DESC') ->get() ->groupBy(function($date) { return Carbon::parse($date->created_at)->format('M'); // grouping by months


I would follow te same way as above

05 Jan
8 months ago

Tangente left a reply on Website Gets Messed Up On Update

sorry, it's hard to troubleshoot without having access to your dev. i would inspect the code (F12 on keyboard), and see why the production layout displays different in dev. it has to be issue with CSS files somewhere

btw, the only difference i see between the two is that the section that displays picture displays shorter than on production. does it function well as it does on production?

Tangente left a reply on Pulling Data From Table Based On ID

I think you are trying to list all users too??

try this:

in controller, change this line to:

return view('profile', compact('validations', 'users', 'availability','profile'));//the profile has all the info you need for specific user, right? 
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>View Profile - {{ $profile->name_first }} {{ $profile->name_last }}</h2>
        <ol class="breadcrumb">
                <a href="{{ url('dashboard')}}">Users</a>
 @foreach($users as $user)
            <li class="active">            
                <strong>{{ user->name_first }} {{ $user->name_last }}</strong>

Tangente left a reply on Zip Request Files

in nutshell, that links says this:

add zipper package

composer require chumper/zipper

then add it in service providers array

'providers' => [
        // ...

make alias of it in alias array

'aliases' => [
        // ...
        'Zipper' => 'Chumper\Zipper\Zipper',

make a function to create zip files

 public function create()
        $files = base_path(); //here you can specify which files you want

        return response()->download(public_path('test.zip'));

when the user wants to download the file, follow same path:

  $Path = public_path('test.zip');

Tangente left a reply on Website Gets Messed Up On Update

Use browser’s dev tool and make sure all CSS files and JS files are present. It seems like some JS files may be missing

Tangente left a reply on How To Count Total Row Using Vue Js?

If that is an array, then you can use old php length function, like