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
<html> | |
<head> | |
<title>CodeUp.dev</title> | |
</head> | |
<body> | |
<div style="text-align:center;margin:50px;"> | |
<img style="float:none;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAABSCAMAAABdX6lFAAAAjVBMVEUAAABPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDF3nUlPXDFlfz5ujkN3nUlPXDF3nUlPXDF3nUlPXDFSYDNUZDRXaDZZbDdccDlheDxjfT1mgT9riUJwkUVylUZ1mUh3nUksu0oxAAAAIXRSTlMAEBAgIDAwQEBQUGBgcHCAgI+Pn5+vr7+/z8/Pz9/f7+/AFcCyAAAFtElEQVR42u2bfd+bJhSGFYkxRo0xRsnmC3bt3rr6/T/erA/NQQ5IXNZnK7/cfyVyJF5wC8gx3g+tbHxEf6SeK2oe4f384eYKL32E98vHYQjgHPcd/dswDK54uhrt+nOY5IinyWjXXx8mXlc8nYx2fRpmpU45umNG/TS86eaUo0NzTDAIBQ45ulsLugng1CFHF2tBqQC+Ou5o7GnfbUdjTx/ddjTo5IynOTh6TTtXPB3blpQXEdg64unStqTsReDZEU9z65JyhzztsKN/nwDPyNPuOvrzMKlFnnbW0V9+mfiQp3t3Hf3rDIg8ffiBgRO2op9nPOzpi/e9FUaTQu+95c944On9u3majZOY9+66DktP9+BpN4GPiqcv4GkXgbGnD+BpJ4HB0ynytJPA4Okb8rSbwODpAHnaTWCvNnh65ypwavD02VXgwODp1k1gvB+9g4nKTWDwNHwDT7sFjD3t18NdrXPA2NP7XnzEE1OUl2xSlceeTiTO34ojXAZVVFNIkZAV4DAr2KQiC5+cbY/netLp4K/lWM6DpFoKTaoRxEuK |
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 = 99; | |
while ($i >= 0) { | |
$j = $i - 1; | |
echo "$i bottles of beer on the wall. $i bottles of beer!\n"; | |
echo "We take one down and pass it around, $j bottles of beer on the wall!" . PHP_EOL; | |
$i -= 1; | |
if ($i == 2) { |
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
<html> | |
<head> | |
<title>Exampe jQuery Page</title> | |
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
</head> | |
<body> | |
<h1 id="codeup">Hello Codeup</h1> | |
<ul class="codeup"> | |
<li>$ is an alias of `jQuery` to reference the jQuery object.</li> | |
<li>JS natively has `window.onload = function() { console.log('The page has finished loading');`</li> |
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
<html> | |
<head> | |
<title>Whack A Mole</title> | |
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script> | |
<style> | |
#game-board { | |
width: 700; | |
margin: left; |
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 HomeController extends BaseController { | |
/* | |
|-------------------------------------------------------------------------- | |
| Default Home Controller | |
|-------------------------------------------------------------------------- | |
| | |
| You may wish to use controllers instead of, or in addition to, Closure |
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
<p>Please input a number between 1 and 10:</p> | |
<input id="numb" type="text"> | |
<button type="button" onclick="myFunction()">Submit</button> | |
<p id="demo"></p> | |
<script id="jsbin-javascript"> | |
function myFunction() { | |
var x, text; |
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
{{ Form::open(array('action' => array('PostsController@index'), 'class' => 'form-horizontal', 'method' => 'GET')) }} | |
{{ Form::text('search', null) }} | |
{{ Form::submit('Search') }} | |
{{ Form:: close() }} |
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
public function index() | |
{ | |
$search = Input::get('search'); | |
$query = Post::orderBy('created_at', 'desc'); | |
if (is_null($search)) { | |
$posts = $query->paginate(3); | |
} else { | |
$posts = $query->where('title', 'LIKE', "%{$search}%") |
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
bootstrap/start.php | |
Replace this onto line 27. | |
$env = $app->detectEnvironment(function() | |
{ | |
if (!empty($_SERVER['LARAVEL_ENV'])) { | |
return $_SERVER['LARAVEL_ENV']; | |
} |
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
public function store() | |
{ | |
$validator = Validator::make(Input::all(), Post::$rules); | |
if ($validator->fails()) { | |
Session::flash('errorMessage', 'Failed to save post!'); | |
return Redirect::back()->withInput()->withErrors($validator); | |
} else { | |
$post = new Post(); |
OlderNewer