This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Código complexo gerado pela falta de simplicidade na estrutura | |
$labels = DB::table('labelables') | |
->select(['labelables.*', 'labels.id as label_id', 'labels.slug', 'labels.title']) | |
->join('labels', 'labels.id', 'labelables.label_id') | |
->where('labels.title', 'like', '%'.$search.'%') | |
->where('labelables.labelable_type', $request->labelable_type) | |
->whereRaw('(SELECT count(id) | |
FROM labelables AS count_labelables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Código mais simples gerada pela restruturação, focada na simplicidade | |
$currentLabels = $this->getCurrentLabels(); | |
$labels = Label::where('company_id', $company->id) | |
->whereNotIn('labels.id', $currentLabels); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = { | |
init() { | |
this.createScene(); | |
}, | |
createScene() { | |
this.scene = new BABYLON.Scene(this.engine); | |
this.scene.clearColor = new BABYLON.Color4(0, 0, 0, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('content') | |
<table class="table"> | |
<tr> | |
<th>Name</th> | |
<th>Email</th> | |
</tr> | |
@foreach ($users as $user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\User; | |
use Illuminate\Http\Request; | |
class UserController extends Controller | |
{ | |
public function index() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Base; | |
use Illuminate\Foundation\Bus\DispatchesJobs; | |
use Illuminate\Routing\Controller as BaseController; | |
use Illuminate\Foundation\Validation\ValidatesRequests; | |
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; | |
abstract class CrudController extends BaseController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Base; | |
use ReflectionClass; | |
use Illuminate\Support\Str; | |
use Illuminate\Foundation\Bus\DispatchesJobs; | |
use Illuminate\Routing\Controller as BaseController; | |
use Illuminate\Foundation\Validation\ValidatesRequests; | |
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Models\User; | |
use Illuminate\Http\Request; | |
use Spatie\Permission\Models\Role; | |
use Illuminate\Support\Facades\Hash; | |
use App\Http\Requests\UserStoreRequest; | |
use Illuminate\Support\Facades\Storage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function imageViewer() { | |
return { | |
imageUrl: '', | |
} | |
} |