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 class="table-responsive"> | |
<table class="table table-striped table-sm"> | |
<thead> | |
<tr> | |
<th>#</th> | |
<th>Title</th> | |
<th>Body</th> | |
</tr> | |
</thead> | |
<tbody> |
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
<script> | |
import SystemInformation from './LandingPage/SystemInformation' | |
export default { | |
name: 'landing-page', | |
components: { SystemInformation }, | |
data () { | |
return { | |
posts: [] | |
} |
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
export default { | |
.... | |
data () { | |
return { | |
posts: [] | |
} | |
}, | |
created () { | |
this.getPosts() | |
}, |
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
methods: { | |
open (link) { | |
this.$electron.shell.openExternal(link) | |
}, | |
getPosts () { | |
const posts = JSON.parse(localStorage.getItem('posts')) | |
this.posts = posts | |
} | |
} |
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
<template> | |
<div id="main"> | |
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0"> | |
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">Electron CMS</a> | |
<input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search"> | |
<ul class="navbar-nav px-3"> | |
<li class="nav-item text-nowrap"> | |
<a class="nav-link" href="#">Sign out</a> | |
</li> | |
</ul> |
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
<style> | |
@import url('https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css'); | |
body { | |
font-size: .875rem; | |
} | |
.feather { | |
width: 16px; |
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
@foreach($users as $user) | |
<a href="/view/$user->id">View user</a> | |
<a href="/edit/$user->id">Edit user</a> | |
<form action="/delete/$user->id" method="post"> | |
<button type="submit">Delete user</button> | |
</form> | |
@endforeach |
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 | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
class CorsMiddleware | |
{ | |
/** |
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
// Local - (optional, use w care) | |
git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d | |
// Origin - (remove merged branch in origin) | |
git remote prune origin |
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
public function testUpdateBook() { | |
$book = factory(Book::class)->create(); | |
$data = [ | |
'author' => 'John Doe' | |
]; | |
$this->put(route('book.update', $book->id), $data) | |
->assertStatus(200) |