Laravel Artisan Commands

4 years ago

amacsmith

A list of Laravel's Artisan Commands with namespace, description, and how to run in console.

Controller:

$allCommands = Artisan::all();

return view('__tinker__::tinker', compact('allCommands'));

View:

<html class="h-full">
    <body class="h-full">
      <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
      <div class="h-full w-full overflow-scroll">
  
  		<div class="flex justify-center">
  			<h1 class="text-3xl">Laravel Artisan Commands</h1>
  		</div>
  		<div class="flex flex-wrap justify-center">
          @foreach($allCommands as $name => $command)
          <div class="max-w-sm w-1/4 bg-white m-4 rounded shadow-lg flex-col flex overflow-hidden">
            <div class="px-6 py-4 flex-1">
              <div class="font-bold text-2xl mb-3  text-red-500">{{ $name }}</div>
              
  			  <div class="text-lg mb-2 mt-4">{{ $command->getDescription() }}</div>
  			  
            </div>
  			<div class="px-6 mb-3 flex-2">
            	<p class="text-red-400 text-base">
            	  	php artisan {{ $name }}
            	</p>
            </div>
          </div>        
          @endforeach
		</div>
      </div>
    </body>
</html>
New course: Desktop apps with Electron