Skip to content

Instantly share code, notes, and snippets.

View phreakin's full-sized avatar

Phreakin phreakin

View GitHub Profile
@phreakin
phreakin / pint.json
Created May 15, 2023 12:44
pint.json
{
"preset": "laravel",
"rules": {
"blank_line_before_statement": {
"statements": [
"return",
"try"
]
},
"concat_space": {
@phreakin
phreakin / material.css
Created May 13, 2023 06:38
material.css
.material-red.lighten-5 {
background-color: #ffebee;
}
.material-red-text.text-lighten-5 {
color: #ffebee;
}
.material-red-border.border-lighten-5 {
border-color: #ffebee;
@phreakin
phreakin / _variables.scss
Last active May 13, 2023 06:38
_variables.scss
// Root Colors
:root {
--primary: #446e9b;
--secondary: #373a3c;
--success: #93c54b;
--info: #5bc0de;
--warning: #f0ad4e;
--danger: #e74c3c;
--light: #f7f7f7;
--dark: #333333;
@phreakin
phreakin / table.blade.php
Created May 12, 2023 08:23
table.blade.php
@extends('layouts.admin')
@section('content')
<section class="section">
<div class="container is-fluid">
<div class="card no-box-shadow-mobile">
<header class="card-header">
<p class="card-header-title">
{{ __(Route::getCurrentRoute()->getName()) }}
@if (isset($link))
@phreakin
phreakin / logout.blade.php
Created May 12, 2023 08:21
logout.blade.php
<div class="navbar-item {{ $class ?? '' }}">
<form method="POST" action="{{ route('auth.logout') }}">
@csrf
<p class="field">
<button type="submit" class="button is-dark">
<span class="icon">
{!! icon('log-out') !!}
</span>
<span>
{{ __('auth.logout') }}
@phreakin
phreakin / hero.blade.php
Created May 12, 2023 08:15
hero.blade.php
<section class="hero is-primary {{ $class ?? '' }}">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column is-12">
<h1 class="title">
<i class="fas fa-{{ $icon ?? 'home' }}"></i>
{{ $title }}
</h1>
<h2 class="subtitle">
@phreakin
phreakin / Page.php
Created May 12, 2023 08:14
Page.php
<?php
namespace App\Models;
use App\Base\SluggableModel;
use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
@phreakin
phreakin / errors.blade.php
Created May 12, 2023 08:10
errors.blade.php
@if (isset($errors) && count($errors) > 0)
@foreach ($errors->all() as $error)
<div class="notification response-notification is-warning has-text-centered">
<span class="icon">{!! icon('alert-circle') !!}</span>
<span class="text">{{ $error }}</span>
</div>
@endforeach
@endif
@if (session()->has('error'))
<div class="notification response-notification is-warning has-text-centered">
@phreakin
phreakin / pint.json
Created May 8, 2023 03:37
pint.json
{
"preset": "laravel",
"rules": {
"blank_line_before_statement": {
"statements": [
"return",
"try"
]
},
"concat_space": {
@phreakin
phreakin / musicbrainz_api_php.md
Created April 22, 2023 02:43
Cheatsheet For MusicBrainz API with PHP

Cheatsheet For MusicBrainz API with PHP:

1. Obtain an API key from MusicBrainz by registering on their website.

2. Initialize a new cURL session using curl_init().

$curl = curl_init();