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\Admin; | |
use Illuminate\Http\Request; | |
use App\Models\Event; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Support\Str; | |
class EventController extends Controller |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content=""> | |
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors"> | |
<meta name="generator" content="Jekyll v4.0.1"> | |
<title>@yield('title') Administrar Eventos</title> |
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('title') Criar Evento - @endsection | |
@section('content') | |
<div class="row"> | |
<div class="col-12 my-5"> | |
<h2>Criar Evento</h2> | |
</div> |
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('title') Editar Evento - @endsection | |
@section('content') | |
<div class="row"> | |
<div class="col-12 my-5"> | |
<h2>Editar Evento</h2> | |
</div> |
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 | |
use Illuminate\Foundation\Auth\EmailVerificationRequest; | |
use Illuminate\Http\Request; | |
Route::get('/email/verify', function () { | |
return view('auth.verify'); | |
})->middleware('auth')->name('verification.notice'); | |
Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request) { |
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
{ | |
"require": { | |
"php": "^7.3", | |
"fideloper/proxy": "^4.0", | |
"guzzlehttp/guzzle": "^7.0.1", | |
"laravel/framework": "^8.0", | |
"laravel/legacy-factories": "^1.1", | |
"laravel/tinker": "^2.0", | |
"laravel/ui": "^3.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
<?php | |
//Criando perfil e associando ao usuários | |
//Salvando perfil pro usuário usando Active Record | |
$p = \App\Models\Profile(); | |
$p->about = 'Sobre mim...'; | |
$p->phone = '99999999'; | |
$p->social_networks = 'social_networks'; |
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 | |
//Salvando relação 1 pra muitos onde fotos pertencem a um evento, usando Active Record | |
$photo = new \App\Models\EventPhoto(); | |
$photo->photo = 'example.jpeg'; | |
$event = \App\Models\Event::find(1)->photos()->save($photo); | |
//Salvando relação 1 pra muitos onde fotos pertencem a um evento, usando Mass Assignment | |
$photo = ['photo' => 'example2.jpeg']; |
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 | |
//Associando categorias existentes a um Evento | |
$categories = [1,2,3,4]; // Id das categorias recuperados do banco | |
$event = \App\Models\Event::find(1); | |
//Adiciona, na ligação da tabela intermediária/pivot, as 4 categorias recuperadas anteriorment na variável $categories | |
$event->categories()->attach($categories); |
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
export PATH="/usr/local/opt/[email protected]/bin:$PATH" | |
export PATH="/usr/local/opt/[email protected]/sbin:$PATH" |