Updates
This commit is contained in:
@@ -3,77 +3,21 @@
|
||||
namespace Modules\Pricing\Http\Controllers;
|
||||
|
||||
use Illuminate\Contracts\Support\Renderable;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Controller;
|
||||
use Modules\Platform\app\Models\PlatformPrice;
|
||||
|
||||
class PricingController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* @return Renderable
|
||||
* Display the platform pricing cards from the shared Platform price model.
|
||||
*/
|
||||
public function index()
|
||||
public function index(): Renderable
|
||||
{
|
||||
return view('pricing::index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
* @return Renderable
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return view('pricing::create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* @param Request $request
|
||||
* @return Renderable
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the specified resource.
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('pricing::show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
return view('pricing::edit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* @param Request $request
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* @param int $id
|
||||
* @return Renderable
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
return view('platform::prices.public', [
|
||||
'prices' => PlatformPrice::query()
|
||||
->where('is_active', true)
|
||||
->ordered()
|
||||
->get(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Modules\Pricing\Http\Controllers\PricingController;
|
||||
|
||||
Route::prefix('pricing')->group(function() {
|
||||
Route::get('/', 'PricingController@index');
|
||||
});
|
||||
Route::middleware(['auth', 'verified', 'tenant.assigned'])
|
||||
->prefix('pricing')
|
||||
->name('pricing.')
|
||||
->group(function (): void {
|
||||
Route::get('/', [PricingController::class, 'index'])->name('index');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user