-
-
Save Kindari/4139468 to your computer and use it in GitHub Desktop.
Caching issue
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
@extends('partials.template') | |
@section('content') | |
<div class="g two-thirds"> | |
<h2>About Me</h2> | |
<p> | |
Back-end PHP Developer from Huddersfield, UK | |
</p> | |
<p> | |
More info coming when I know what to put here. | |
</p> | |
<p class=proceed><a href="{{ URL::to('about') }}" class="go">Read more...</a></p> | |
</div> | |
<div class="g one-third"> | |
</div> | |
<div class="g one-whole"> | |
<p>There will be other stuff here shortly</p> | |
</div> | |
@stop |
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
@extends('partials.template') | |
@section('content') | |
<div class="g two-thirds"> | |
<h2>Contact Me</h2> | |
<div id="wufoo-z7x3p9"> | |
Fill out my <a href="http://aranw.wufoo.com/forms/z7x3p9">contact form</a>. | |
</div> | |
<script type="text/javascript"> | |
var z7x3p9;(function(d, t) { | |
var s = d.createElement(t), options = { | |
'userName':'aranw', | |
'formHash':'z7x3p9', | |
'autoResize':true, | |
'height':'517', | |
'async':true, | |
'header':'show' | |
}; | |
s.src = ('https:' == d.location.protocol ? 'https://' : 'http://') + 'wufoo.com/scripts/embed/form.js'; | |
s.onload = s.onreadystatechange = function() { | |
var rs = this.readyState; | |
if (rs) | |
if (rs != 'complete') | |
if (rs != 'loaded') return; | |
try { | |
z7x3p9 = new WufooForm(); | |
z7x3p9.initialize(options); | |
z7x3p9.display(); | |
} catch (e) {}}; | |
var scr = d.getElementsByTagName(t)[0], | |
par = scr.parentNode; | |
par.insertBefore(s, scr); | |
})(document, 'script'); | |
</script> | |
</div> | |
<div class="g one-third social"> | |
<h2>Social Links</h2> | |
</div> | |
@stop |
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 | |
class PageController extends Controller { | |
/** | |
* Blog Posts | |
* | |
* @var array | |
**/ | |
protected $posts; | |
/** | |
* undocumented function | |
* | |
* @return void | |
* @author | |
**/ | |
public function __construct(PostRepository $posts) | |
{ | |
$this->posts = $posts; | |
} | |
public function showIndex() | |
{ | |
$view = View::make('pages.index'); | |
$view->with('title', "Aran Wilkinson - Web Developer"); | |
// Get the 5 latest blog posts titles | |
$posts = $this->posts->getLatestPosts(5, array('id', 'title', 'slug')); | |
$view->with('posts', $posts); | |
return $view; | |
} | |
public function showAbout() | |
{ | |
$view = View::make('pages.about'); | |
$view->with('title', "About"); | |
if (Cache::has('page.about')) | |
{ | |
return Cache::get('page.about'); | |
} | |
else | |
{ | |
Cache::put('pages.about', $view, '2880'); | |
return $view; | |
} | |
} | |
public function showContact() | |
{ | |
return Cache::remember('pages.contact', '2880', function(){ | |
return View::make('pages.contact')->with('title','Contact'); | |
}); | |
} | |
} |
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
60/60Exception: Serialization of 'Closure' is not allowed | |
in /Users/aran/Sites/blog/vendor/illuminate/cache/src/Illuminate/Cache/FileStore.php line 75 | |
at serialize() in /Users/aran/Sites/blog/vendor/illuminate/cache/src/Illuminate/Cache/FileStore.php line 0 | |
at FileStore->storeItem('pages.contact', object(View), '2880') in /Users/aran/Sites/blog/vendor/illuminate/cache/src/Illuminate/Cache/Store.php line 114 | |
at Store->put('pages.contact', object(View), '2880') | |
at call_user_func_array(array(object(FileStore), 'put'), array('pages.contact', object(View), '2880')) in /Users/aran/Sites/blog/vendor/illuminate/support/src/Illuminate/Support/Manager.php line 127 | |
at Manager->__call('put', array('pages.contact', object(View), '2880')) | |
at CacheManager->put('pages.contact', object(View), '2880') | |
at call_user_func_array(array(object(CacheManager), 'put'), array('pages.contact', object(View), '2880')) in /Users/aran/Sites/blog/vendor/illuminate/support/src/Illuminate/Support/Facade.php line 56 | |
at Facade::__callStatic('put', array('pages.contact', object(View), '2880')) in /Users/aran/Sites/blog/app/controllers/PageController.php line 63 | |
at Cache::put('pages.contact', object(View), '2880') in /Users/aran/Sites/blog/app/controllers/PageController.php line 63 | |
at PageController->showContact() | |
at call_user_func_array(array(object(PageController), 'showContact'), array()) in /Users/aran/Sites/blog/vendor/illuminate/routing/src/Illuminate/Routing/Controllers/Controller.php line 131 | |
at Controller->directCallAction('showContact', array()) in /Users/aran/Sites/blog/vendor/illuminate/routing/src/Illuminate/Routing/Controllers/Controller.php line 116 | |
at Controller->callAction(object(Application), object(Router), 'showContact', array()) in /Users/aran/Sites/blog/vendor/illuminate/routing/src/Illuminate/Routing/Router.php line 509 | |
at Router->Illuminate\Routing\{closure}() | |
at call_user_func_array(object(Closure), array()) in /Users/aran/Sites/blog/vendor/illuminate/routing/src/Illuminate/Routing/Route.php line 64 | |
at Route->callCallable() in /Users/aran/Sites/blog/vendor/illuminate/routing/src/Illuminate/Routing/Route.php line 39 | |
at Route->run(object(Request)) in /Users/aran/Sites/blog/vendor/illuminate/routing/src/Illuminate/Routing/Router.php line 538 | |
at Router->dispatch(object(Request)) in /Users/aran/Sites/blog/vendor/illuminate/foundation/src/Illuminate/Foundation/Application.php line 243 | |
at Application->dispatch(object(Request)) in /Users/aran/Sites/blog/vendor/illuminate/foundation/src/Illuminate/Foundation/Application.php line 223 | |
at Application->run() in /Users/aran/Sites/blog/public/index.php line 51 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment