vendredi 24 juin 2016

Where in Source Code Does Laravel 5.2 Convert Route Prefixes to Parameters

In a nutshell, I keep finding forums on how to use the route prefixes, but I am wondering where it is that Laravel converts route prefixes into parameters that can be used in the views example: {customer_id}

I am trying to test a controller in Laravel 5.2 with PHPUnit/Mockery, Doctrine 2, and about 15 other dependencies. I have route prefixes of admin and customer that need to be pulled down as parameters. Everything on the live site works fine, so I know the actual code is correct. The other parameters work fine -- just not static prefixes. The tests worked great with Eloquent and had no problems converting the prefixes to parameters before my manager added a bunch of new dependencies. Now the prefix parameter returns null during testing on every test. One of the new dependencies broke something involved with testing--likely autoloading.

I've already found that Illuminate\Support\Facades\Route; was autoloaded prior to the merge, and now it needs to be manually added to the testcase. I'm wondering if this isn't the same thing I need to do to get the route prefixes to work properly.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/28Q9A2M
via IFTTT

Aucun commentaire:

Enregistrer un commentaire