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
// | |
// WordpressImport Class Built for LaravelVoyager | |
// | |
class WordpressImport | |
{ | |
// store the Wordpress XML | |
public $wpXML; | |
public $authors; |
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 Post extends Model{ | |
protected $appends = ['link', 'next']; | |
public function getLinkAttribute() | |
{ | |
return route('single-post', ['category' => $this->category->slug,'slug' => $this->slug]).'/'; | |
} |
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 | |
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 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 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 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 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 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 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>@if(isset($seo_title)){{ $seo_title . ' - Site Name' }}@else{{ 'Site Name - Default Site Headline' }}@endif</title> | |
<!-- only set meta description and keywords if exists --> |