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 | |
function canonical() | |
{ | |
$route = Route::current(); | |
if (!$route) { | |
return false; | |
} | |
$action = $route->getAction(); | |
if (!$action) { |
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 | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class GoogleDriveServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Bootstrap the application services. |
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
<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">«</span> | |
<span class="sr-only">Previous</span> | |
</slot> | |
</a> | |
</li> |
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 | |
namespace App\Jobs\Projects; | |
use App\Models\Project; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Foundation\Bus\Dispatchable; |
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 | |
namespace App\Validators; | |
use GuzzleHttp\Client; | |
class ReCaptcha | |
{ | |
public function validate($attribute, $value, $parameters, $validator) | |
{ |
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
mysqldump -u root -p database --ignore-table=database.table1 --ignore-table=database.table2 > dump.sql |
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
<template> | |
<renderless-pagination :data="data" :limit="limit" v-on:pagination-change-page="onPaginationChangePage"> | |
<ul class="pagination" v-if="computed.total > computed.perPage" slot-scope="{ data, limit, computed, prevButtonEvents, nextButtonEvents, pageButtonEvents }"> | |
<li class="page-item pagination-prev-nav" v-if="computed.prevPageUrl"> | |
<a class="page-link" href="#" aria-label="Previous" v-on="prevButtonEvents"> | |
<slot name="prev-nav"> | |
<span aria-hidden="true">«</span> | |
<span class="sr-only">Previous</span> | |
</slot> | |
</a> |
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
// Inside appserviceprovider: | |
private function bootPloiSocialite() | |
{ | |
$socialite = $this->app->make('Laravel\Socialite\Contracts\Factory'); | |
$socialite->extend( | |
'ploi', | |
function ($app) use ($socialite) { | |
$config = $app['config']['services.ploi']; | |
return $socialite->buildProvider(PloiProvider::class, $config); | |
} |
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 | |
namespace App\Utilities\Discord; | |
use Exception; | |
use GuzzleHttp\Client as HttpClient; | |
use GuzzleHttp\Exception\RequestException; | |
use App\Exceptions\CouldNotSendNotification; | |
class Discord |
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 | |
# System + MySQL backup script | |
# Full backup day - Sun (rest of the day do incremental backup) | |
# Copyright (c) 2005-2006 nixCraft <http://www.cyberciti.biz/fb/> | |
# This script is licensed under GNU GPL version 2.0 or above | |
# Automatically generated by http://bash.cyberciti.biz/backup/wizard-ftp-script.php | |
# --------------------------------------------------------------------- | |
### System Setup ### | |
DIRS="/home /etc /var/www" | |
BACKUP=/tmp/backup.$$ |
OlderNewer