This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class MakeRepository extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(!function_exists('implodeAnd')){ | |
/** | |
* Implode array into asentence | |
* @param array $haystack | |
* @param string $glue | |
* @param string $and | |
* @return string | |
*/ | |
function implodeAnd(array $haystack, string $glue=', ', string $and = ' and '): string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param $route | |
* @return bool | |
*/ | |
function checkRoute($route) { | |
$routes = \Route::getRoutes()->getRoutes(); | |
foreach($routes as $r){ | |
if($r->getUri() == $route){ | |
return true; | |
} |