Skip to content

Instantly share code, notes, and snippets.


Muah ctf0

View GitHub Profile
View laravel excel sheet formating.php
// thanx to
// no we can auto handle all the cells in the sheet
// in one go
public function registerEvents(): array
return [
BeforeExport::class => function (BeforeExport $event) {
$writer = $event->writer;
View laravel auto resolve polymorphic many to
View laravel multi

incase you want to use a different/separate provider to allow users to login into the app, with this everything in app logic remains the same while achieving exactly what we want

  • model
class Admin extends Authenticatable
    use Notifiable;

    protected $guarded = ['id'];
View _vscode custom
  • add the files in that order
"vscode_custom_css.imports": [
    "file:///path/to/tabs-curve.css", // or normal
View -vscode
  • get current theme styles
const color = new vscode.ThemeColor('badge.background');
  • commands icons can use vscode builtin
"commands": [
    // ... ,
View array min
  • langs/*/validation.php

['array_min_items' => 'at least :value :attribute is required'],
  • AppServiceProvider.php
View ScrollingLettersAnimation.js
* demo1.js
* Licensed under the MIT license.
* Copyright 2018, Codrops
ctf0 / -laravel
Last active Jul 16, 2020
laravel tips
View -laravel
  • php assoc array to correct js array of objs

$data = [
    'Users' => 'abc',
    'posts' => 'blabla',
You can’t perform that action at this time.