This file contains 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
class FoodItemTemplatesController extends \BaseController { | |
... | |
public function index() | |
{ | |
$food_item_templates = $this->foodItemTemplate->all(); | |
return Response::json($food_item_templates); | |
} |
This file contains 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
... | |
export APP_ENV=production | |
... |
This file contains 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
[Illuminate\Database\QueryException] | |
SQLSTATE[2BP01]: Dependent objects still exist: 7 ERROR: cannot drop table food_it | |
em_templates because other objects depend on it | |
DETAIL: constraint food_items_food_item_template_id_foreign on table food_items de | |
pends on table food_item_templates | |
HINT: Use DROP ... CASCADE to drop the dependent objects too. (SQL: drop table "fo | |
od_item_templates") |
This file contains 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 | |
Auth::loginUsingId(1); |
This file contains 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 | |
use \AcceptanceTester; | |
use MyApp\TestHelpers\NavBarHelper; | |
use MyApp\TestHelpers\SignUpHelper; | |
class SignUpCest { | |
/** | |
* @var SignUpHelper | |
*/ |
This file contains 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 | |
class SignUpHelper { | |
/** | |
* @var AcceptanceTester | |
*/ | |
private $tester; | |
function __construct(AcceptanceTester $tester) | |
{ |
This file contains 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 | |
$I = new AcceptanceTester($scenario); | |
$I->wantTo('see the landing page'); | |
$I->amOnPage('/'); | |
$I->see('Welcome'); |
This file contains 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
/** | |
* Display the specified resource. | |
* GET /food_items/{id} | |
* | |
* @param int $id | |
* @return Response | |
*/ | |
public function show($id) | |
{ | |
if ($food_item = $this->foodItem->find($id)) |
This file contains 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
server { | |
listen 80 default_server; | |
# listen [::]:80 default_server ipv6only=on; | |
root /home/ubuntu/public_html; | |
index index.html index.htm index.php; | |
# Make site accessible from http://localhost/ | |
server_name 54.23.4.31; |
This file contains 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 | |
class ExampleTest extends TestCase { | |
/** | |
* A basic functional test example. | |
* | |
* @return void | |
*/ | |
public function testBasicExample() |