Skip to content

Instantly share code, notes, and snippets.

Да се направи vue + vuetify app , който
- да взима офисите на еконт или директно с axios или да се направи api end point на laravel
- да ги слага в vuex store
- да ги визуализира в https://vuetifyjs.com/en/components/data-tables/#custom-filter
Docs:
https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
http://ee.econt.com/services/
@gdinko
gdinko / test.php
Created April 1, 2022 17:51
Laravel service provider singleton not singleton
<?php
public function index(Request $request, Cart $cart)
{
$cartFacade = CartFacade::getMe();
$cartHelper = cart()->getMe();
$cartFacade->is = 1;
echo 'Object ID from facade: ' . spl_object_id($cartFacade) . "<br />";
@gdinko
gdinko / helpers.php
Created April 1, 2022 17:32
cart helper function
<?php
if (!function_exists('cart')) {
function cart()
{
return app('cart');
}
}
@gdinko
gdinko / Cart.php
Created April 1, 2022 17:30
Cart Facade
<?php
namespace App\Facades;
use Illuminate\Support\Facades\Facade;
class Cart extends Facade
{
/**
* Get the registered name of the component.
@gdinko
gdinko / CartServiceProvider.php
Last active April 2, 2022 12:46
Laravel Cart Service Provider
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Cart\Cart;
class CartServiceProvider extends ServiceProvider
{
/**
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Requests\ClientCategoryRequest;
use App\Http\Requests\ClientRequest;
use App\Models\Client;
use App\Models\Business;
use Illuminate\Http\Request;
@gdinko
gdinko / phpmdnoelse.php
Created January 26, 2019 14:55
phpmdnoelse
<?php
if (!empty($postData['html'])) {
$this->setHtml($postData['html']);
unset($postData['html']);
}
if (!empty($postData['url'])) {
$this->setUrl($postData['url']);
unset($postData['url']);
@gdinko
gdinko / phpmdelse.php
Created January 26, 2019 14:52
phpmd else
<?php
if (empty($postData['url'])) {
$this->setHtml($postData['html']);
unset($postData['html']);
} else {
$this->setUrl($postData['url']);
unset($postData['url']);
}