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
<!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\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
<?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\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 | |
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
-- 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 | |
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
<?php | |
namespace App\Http\Livewire\Tenants\RestaurantMenu; | |
use App\Models\Tenant\Menu; | |
use Livewire\Component; | |
class Index extends Component | |
{ | |
protected $listeners = ['menuItemUpdated' => '$refresh', 'menuItemDeleted' => '$refresh']; |
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\RestaurantMenu; | |
use App\Models\Tenant\Restaurant; | |
use App\Models\Tenant\Menu; | |
use Livewire\Component; | |
use Livewire\WithFileUploads; | |
class Item extends Component |