Skip to content

Instantly share code, notes, and snippets.

View rafaelogic's full-sized avatar

Rafa Rafael rafaelogic

View GitHub Profile
<?php
namespace App\Orchid\Filters\Stats;
use Illuminate\Database\Eloquent\Builder;
use Orchid\Filters\Filter;
use Orchid\Screen\Field;
use Orchid\Screen\Fields\Select;
class MonthYearFilter extends Filter
<?php
namespace App\Notifications;
use App\Student;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class StudentAdded extends Notification
{
<?php
namespace Tests\Unit;
use App\Mail\TeacherConfirmationEmail;
use App\Mail\StudentDeletedEmail;
use App\Student;
use App\Teacher;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Mail;
<?php
namespace Tests\Unit;
use App\Mail\TeacherConfirmationEmail;
use App\Mail\StudentDeletedEmail;
use App\Classroom;
use App\Student;
use App\Teacher;
use Illuminate\Foundation\Testing\RefreshDatabase;
@rafaelogic
rafaelogic / SeedClassroom.php
Last active May 3, 2019 08:14
A custom artisan command that will seed classroom data with teacher and students.
<?php
namespace App\Console\Commands;
use App\Student;
use App\Teacher;
use App\User;
use Illuminate\Console\Command;
class SeedClassroom extends Command
<template>
<div>
<div v-for="user in users" :key="user.id">
<user-profile-modal
:show="showModal(user.id)"
@close="toggleModal(user.id)" />
<a class="text-sm" href="#" @click.stop="toggleModal(user.id)">Show</a>
</div>
</div>
<template>
<div>
<modal :show="show" @close="close">
//The elements that we wanted to be shown or used.
</modal>
</div>
</template>
<script>
import Modal from '../_templates/Modal'
<template>
<transition name="modal">
<div class="modal-mask" @click="close" v-show="show">
<div class="modal-container" @click.stop="close">
<slot></slot>
</div>
</div>
</transition>
</template>
<?php
namespace App\Http\Controllers;
class ImplementationController extends Controller
{
public function implementationMethod(Job $job)
{
$users = User::whereExists(
function($query) use($job) {
$query->from('users_position')
export default {
inject: ['$validator'],
}