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
$(document).ready(function(){ | |
// transition can be fade or slide | |
var transition = 'slide'; | |
if(transition == 'slide'){ | |
$('.slider').children().wrapAll('<div class="slider-container"></div>'); | |
$('.slider-container').css('width', $('.slider').width() * $('.slider .content').length ); | |
$.each($('.slider .content'), function(index, value){ | |
$(this).addClass('slide'); |
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
// | |
// WordpressImport Class Built for LaravelVoyager | |
// | |
class WordpressImport | |
{ | |
// store the Wordpress XML | |
public $wpXML; | |
public $authors; |
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 Post extends Model{ | |
protected $appends = ['link', 'next']; | |
public function getLinkAttribute() | |
{ | |
return route('single-post', ['category' => $this->category->slug,'slug' => $this->slug]).'/'; | |
} |
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 | |
public function show($slug, $page = null) | |
{ | |
// GET ALL YOUR POST DATA | |
// $post = Post::where('slug', '=', $slug)->firstOrFail(); | |
// $data = ... | |
// Add this peice to the end of your show method for your post | |
if($request->ajax()){ |
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
<div id="{{ $post->slug }}"> | |
<!-- THE MAIN CONTENT FOR YOUR POST HERE --> | |
</div> |
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
if(document.getElementById('post')){ | |
window.VueAppPost = new Vue({ | |
el: '#post' | |
}); | |
} |
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
<div id="post"> | |
@include('partials.post') | |
<infinite-scroll-post post="{{ $post }}" loader="/path/to/loader.svg"></infinite-scroll-post> | |
</div> |
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
#!/bin/sh | |
# Make our New Application folder | |
mkdir application | |
# Loop through all the files in the current directory and move them to the new application folder | |
# Exclude '.', '..', 'application', and 'uploadable.sh' | |
for i in `ls -a`; | |
do |
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
root_path="./" | |
mkdir ${root_path}/application | |
cp -a ${root_path}/app ${root_path}/application/app | |
cp -a ${root_path}/bootstrap ${root_path}/application/bootstrap | |
cp -a ${root_path}/config ${root_path}/application/config | |
cp -a ${root_path}/database ${root_path}/application/database | |
cp -a ${root_path}/resources ${root_path}/application/resources | |
cp -a ${root_path}/storage ${root_path}/application/storage | |
cp -a ${root_path}/vendor ${root_path}/application/vendor |