refactoring on Articles, minor fixes
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Shop;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Shop\Articles;
|
||||
use App\Repositories\Shop\ArticleSiblings;
|
||||
|
||||
class ArticleController extends Controller
|
||||
{
|
||||
@@ -11,7 +12,7 @@ class ArticleController extends Controller
|
||||
{
|
||||
$data = [
|
||||
'article' => Articles::getArticleToSell($id),
|
||||
'offers2' => Articles::getSiblings($id)->toArray(),
|
||||
'offers2' => ArticleSiblings::getSiblings($id)->toArray(),
|
||||
];
|
||||
|
||||
return view('Shop.Articles.show', $data);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace App\Http\Controllers\Shop;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Repositories\Core\PDF;
|
||||
use App\Repositories\Shop\InvoicePDF;
|
||||
use App\Repositories\Shop\Invoices;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
@@ -24,11 +24,6 @@ class InvoiceController extends Controller
|
||||
{
|
||||
\Debugbar::disable();
|
||||
|
||||
$data = [
|
||||
'invoice' => Invoices::getByUUID($uuid),
|
||||
];
|
||||
$filename = 'invoice-'.$uuid.'.pdf';
|
||||
|
||||
return PDF::view('Shop.Invoices.pdf', $data, $filename);
|
||||
return InvoicePDF::getByUUID($uuid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user