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 PageController extends Controller { | |
/** | |
* Blog Posts | |
* | |
* @var array | |
**/ | |
protected $posts; |
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 Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
class NoPostsException extends Exception {} | |
class PostController extends Controller | |
{ | |
/** |
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 showPost($post = null) | |
{ | |
$view = View::make('blog.post'); | |
$view->with('title', "Aran Wilkinson - "); // We need to get the post title | |
$view->with('post', $this->posts->getPostBySlug($post)); | |
// | |
// Get the requested blog post | |
// If it doesn't exist give 404 error | |
// |
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 showPost($post = null) | |
{ | |
$view = View::make('blog.post'); | |
$view->with('title', "Aran Wilkinson - "); // We need to get the post title | |
$view->with('post', $this->posts->getPostBySlug($post)); | |
// | |
// Get the requested blog post | |
// If it doesn't exist give 404 error | |
// |
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 Fatal error: Call to undefined function Illuminate\mcrypt_create_iv() in /Users/aran/Sites/blog/vendor/illuminate/encryption/src/Illuminate/Encrypter.php on line 54 | |
Fatal error: Call to undefined function Illuminate\mcrypt_create_iv() in /Users/aran/Sites/blog/vendor/illuminate/encryption/src/Illuminate/Encrypter.php on line 54 |
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 Album extends \Eloquent | |
{ | |
public static $timestamps = true; | |
public function artist() | |
{ | |
return $this->belongs_to('Askonasholt\Artist'); | |
} | |
public function image() |
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
<div id="overlay" class="lb"> | |
<div class="media"> | |
<img src="assets/images/content/lightbox-image.jpg" alt="" /> | |
<div class="titlebar"> | |
<a class="close">Close</a> | |
<p><span class="current">1</span> of <span class="total">25</span></p> | |
</div> <!-- titlebar --> | |
<div class="heading"> |
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 | |
namespace Askonasholt; | |
class Artist extends \Eloquent | |
{ | |
public static $timestamps = true; | |
public function category() | |
{ | |
return $this->has_many_and_belongs_to('Askonasholt\Category'); |
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
if ( ! file_exists($image->saved_to.$filename_stripped.'-480.'.$filename_ext)) | |
{ | |
$file = File::get(path('public').$image->saved_to.$image->filename); | |
$size_480 = Resizer::open($file) | |
->resize(480, 340, "crop") | |
->save($image->saved_to.$filename_stripped."-480.".$filename_ext); | |
var_dump($size_480); | |
} |
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
web1: | |
name: blog | |
document_root: public | |
php_version: 5.3.8 | |
after_build: | |
- "php composer.phar update" | |
shared_writeable_dirs: | |
- app/storage | |
php_extensions: | |
- mysql |