Skip to content

Instantly share code, notes, and snippets.

View voidfire's full-sized avatar
🎯
Focusing

voidfire

🎯
Focusing
  • Greece
View GitHub Profile
@voidfire
voidfire / newEntity.sh
Last active January 27, 2022 15:14
Create Model, Migration and Nova Resource files ./newEntity.sh modelName
#!/bin/bash
if [ $# -eq 0 ]; then
echo -e "No arguments provided, \nTry: ./newEntity.sh modelname \nThe script will generate Model and migration file as well as nova resource file for you"
exit 1
fi
cd ~/nova-backend
ENTITY=$1
php artisan make:model $ENTITY -m
php artisan nova:resource $ENTITY
<?php
///////////////////////////////////////////////////
// STEP 1 - CREATE CLASS THAT WILL BE USED GLOBALY
///////////////////////////////////////////////////
namespace App\MyApp;
class MyApp {
public function sayHello($data = [])
{
echo "Hello World from Facade!";
}
@voidfire
voidfire / List.md
Created May 29, 2019 12:42 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@voidfire
voidfire / stream.js
Created August 9, 2020 01:02 — forked from syntaxhacker/stream.js
NodeJS Mp3 Streaming ExpressJS
var express = require('express');
var app = express();
var fs = require('fs');
app.listen(3000, function() {
console.log("[NodeJS] Application Listening on Port 3000");
});
app.get('/api/play/:key', function(req, res) {
var key = req.params.key;
@voidfire
voidfire / BlockCalendar.vue
Created August 19, 2021 21:29
Create a calendar vue component for twill 2.0
///resources\assets\js\blocks
<template>
<!-- eslint-disable -->
<div class="block__body">
<FullCalendar :options="calendarOptions" />
</div>
</template>
<script>
import BlockMixin from '@/mixins/block'