Skip to content

Instantly share code, notes, and snippets.

View Cannonb4ll's full-sized avatar
🏠

Dennis Smink Cannonb4ll

🏠
View GitHub Profile
@Cannonb4ll
Cannonb4ll / Description
Last active November 16, 2020 12:03
Laravel Trait Make command
Place the TraitMakeCommand.php file inside App\Console\Commands
Place the trait.stub file inside App\Console\Commands\stubs
@Cannonb4ll
Cannonb4ll / Pagination.vue
Created June 4, 2018 06:47
Vue Pagination Laravel
<template>
<ul class="pagination" v-if="data.total > data.per_page">
<li class="page-item pagination-prev-nav" v-if="data.prev_page_url">
<a class="page-link" href="#" aria-label="Previous" @click.prevent="selectPage(--data.current_page)">
<slot name="prev-nav">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</slot>
</a>
</li>
@Cannonb4ll
Cannonb4ll / GoogleDriveServiceProvider.php
Created April 30, 2018 17:39 — forked from sergomet/GoogleDriveServiceProvider.php
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
<?php
function canonical()
{
$route = Route::current();
if (!$route) {
return false;
}
$action = $route->getAction();
if (!$action) {