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 Tests\Feature\Version; | |
| use Facades\App\Process; | |
| use Tests\Fake\ProcessFake; | |
| use Tests\TestCase; | |
| class WebServerTest extends TestCase | |
| { |
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\Http\Controllers; | |
| use Facades\App\Process; | |
| class WebServerController extends Controller | |
| { | |
| public function restart() | |
| { |
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 Tests\Fake; | |
| use App\Process; | |
| use PHPUnit\Framework\Assert as PHPUnit; | |
| class ProcessFake extends Process | |
| { | |
| /** |
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 Tests\Integration; | |
| use Facades\App\Process; | |
| use Tests\TestCase; | |
| class ProcessTest extends TestCase | |
| { | |
| /** |
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\Http\Resources; | |
| use Illuminate\Http\Resources\Json\Resource; | |
| class UsersResource extends Resource | |
| { | |
| /** | |
| * Transform the resource into an array. |
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\Http\Controllers; | |
| use App\Http\Resources\UsersResource; | |
| use App\User; | |
| class UsersController extends Controller | |
| { | |
| /** |
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\Http\Resources; | |
| use Illuminate\Http\Resources\Json\Resource; | |
| class UsersResource extends Resource | |
| { | |
| /** | |
| * @var array |
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\Http\Resources; | |
| use Illuminate\Http\Resources\Json\Resource; | |
| class UsersResource extends Resource | |
| { | |
| public static function collection($resource) |
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\Http\Resources; | |
| use Illuminate\Http\Resources\Json\ResourceCollection; | |
| class UsersResourceCollection extends ResourceCollection | |
| { | |
| /** | |
| * @var array |
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\Http\Resources; | |
| use Illuminate\Http\Resources\Json\Resource; | |
| class UsersResource extends Resource | |
| { | |
| /** | |
| * Transform the resource into an array. |