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\Livewire\Tenants; | |
use Livewire\Component; | |
use App\Models\Tenant\Restaurant as RestaurantModel; | |
class Restaurant extends Component | |
{ | |
public ?RestaurantModel $restaurant; |
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
-- MySQL Script generated by MySQL Workbench | |
-- Tue Aug 9 01:29:27 2022 | |
-- Model: New Model Version: 1.0 | |
-- MySQL Workbench Forward Engineering | |
-- ----------------------------------------------------- | |
-- Schema controle_estoque | |
-- ----------------------------------------------------- | |
-- ----------------------------------------------------- |
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 | |
public function setShippingValueAttribute($prop) | |
{ | |
$this->attributes['shipping_value'] = $prop * 100; | |
} | |
public function getShippingValueAttribute() | |
{ | |
return $this->attributes['shipping_value'] / 100; |
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\Front; | |
use App\Http\Controllers\Controller; | |
use App\Models\Store; | |
use Illuminate\Http\Request; | |
class MyOrdersController 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
<?php | |
class CartController extends Controller | |
{ | |
//... | |
public function shipping(Request $request) | |
{ | |
session()->put('shipping_value', $request->shipping_value); | |
return response()->json([], 201); |
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\Models; | |
use App\Traits\BelongsTenantScope; | |
use Illuminate\Database\Eloquent\Factories\HasFactory; | |
use Illuminate\Database\Eloquent\Model; | |
class ShippingOption extends Model | |
{ |
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="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Laravel</title> | |
<!-- Fonts --> | |
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet"> |
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\Livewire; | |
use App\Models\Content; | |
use App\Models\User; | |
use App\Models\Video; | |
use Livewire\Component; | |
class DashboardCounter extends Component |
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 class="mr-4" x-data=""> | |
<a href="#" @click="$event.preventDefault(); | |
if(!confirm('Têm certeza que deseja cancelar sua Assinatura?')) { return false; } | |
else { $wire.cancelSubscription() }" | |
class="px-4 py-2 border-red-900 bg-red-400 hover:bg-red-800 | |
transition ease-in-out duration-300 text-white font-bold rounded">Cancelar</a> | |
</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
<div class="max-w-7xl mx-auto mt-10 py-6 px-4 sm:px-6 lg:px-8"> | |
<x-slot name="header">Minha Assinatura</x-slot> | |
<div class="rounded bg-gray-800 p-2"> | |
<table class="min-w-full divide-y divide-gray-200"> | |
<thead> | |
<tr> | |
<th class="px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider">Data Cobrança</th> | |
<th class="px-6 py-3 text-left text-xs font-medium text-white uppercase tracking-wider">Valor Cobrado</th> |