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
npm install tailwindcss @tailwindcss/forms @tailwindcss/typography autoprefixer tippy.js --save-dev |
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 | |
#up seed | |
$user = \App\Models\User::factory() | |
->hasOrders(1) | |
->create(); | |
$order = $user->orders->first(); |
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
<div id="header-content" class="block w-full py-4 border-b border-gray-300"> | |
<h2 class="text-xl font-bold">Criar Produto</h2> | |
</div> | |
<div class="block w-full border-b pb-10 border-gray-300 py-10"> | |
<form action=""> | |
<div class="w-full flex gap-4"> | |
<div class="w-1/2 block mb-6"> | |
<label class="block mb-2">Nome Produto</label> | |
<input | |
type="text" |
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
<div id="header-content" class="block w-full py-4 border-b border-gray-300"> | |
<h2 class="text-xl font-bold">Produtos</h2> | |
</div> | |
<div class="block w-full border-b pb-10 border-gray-300"> | |
<table class="w-full text-left"> | |
<thead> | |
<tr> | |
<th class="px-6 py-4">#</th> | |
<th class="px-6 py-4">Produto</th> | |
<th class="px-6 py-4">Preço</th> |
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
import httpClient from "@/services/http-client.js"; | |
import storage from "@/services/storage.js"; | |
export default { | |
methods: { | |
logout() { | |
httpClient.post("/logout").then((response) => { | |
storage.remove("token"); | |
location.href = "/auth/login"; | |
}); |
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
import { defineStore } from "pinia"; | |
import httpClient from "@/services/http-client"; | |
export const useProducts = defineStore("products", { | |
state: () => ({ products: null }), | |
getters: { | |
getProducts(state) { | |
return state.products; | |
}, | |
}, |
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\Filament\Resources; | |
use App\Filament\Resources\CategoryResource\Pages; | |
use App\Filament\Resources\CategoryResource\RelationManagers; | |
use App\Models\Category; | |
use Filament\Tables\Columns\TextColumn; | |
use Filament\Forms\Components\TextInput; | |
use Filament\Resources\Form; |
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\API; | |
use App\Http\Controllers\Controller; | |
use App\Models\Book; | |
use Illuminate\Http\Request; | |
use MiniLeanpub\Application\UseCases\Book\CreateBook\CreateBookUseCase; | |
use MiniLeanpub\Application\UseCases\Book\CreateBook\DTO\BookCreateInputDTO; | |
use MiniLeanpub\Infrastructure\Repository\Book\BookEloquentRepository; |
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 Tests\MiniLeanpub\Integration\Application\UseCases\ConvertBookToPDF; | |
use Tests\MiniLeanpub\LaravelTestCase; | |
use App\Models\Book; | |
use MiniLeanpub\Application\UseCases\Book\ConvertBookToPDF\ConvertBookToPDFUseCase; | |
use MiniLeanpub\Application\UseCases\Book\ConvertBookToPDF\DTO\ConvertBookToPDFInputDTO; | |
use MiniLeanpub\Infrastructure\Queue\Book\BookConverterQueueSender; | |
use MiniLeanpub\Infrastructure\Repository\Book\BookEloquentRepository; |
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 MiniLeanpub\Infrastructure\Queue; | |
use App\Jobs\Book\ConvertBookJob; | |
use MiniLeanpub\Domain\Book\Queue\QueueInterface; | |
class BookConverterQueueSender implements QueueInterface | |
{ | |
public function sendToQueue(string $bookPath): bool |