Skip to content

Instantly share code, notes, and snippets.

View nicolaubrasil's full-sized avatar

nicolaubrasil

View GitHub Profile
@nicolaubrasil
nicolaubrasil / AuthService.ts
Created April 2, 2020 12:00 — forked from jaonoctus/AuthService.ts
adonisJS JWT Auth
// VueJS frontend
import ApiService from './api.service'
export type LoginCredentials = {
email: string;
password: string;
}
class AuthService {
@nicolaubrasil
nicolaubrasil / DatabaseSeeder.php
Created July 20, 2019 01:56 — forked from kostaspt/DatabaseSeeder.php
For Laravel database seeder. It truncates all tables and then it runs all seeders available.
// File: app/database/seeds/DatabaseSeeder.php
class DatabaseSeeder extends Seeder {
public function run()
{
if (App::environment() === 'production') exit();
Eloquent::unguard();