admin moons
This commit is contained in:
@@ -26,14 +26,12 @@ class MoonsAdminController extends Controller
|
|||||||
{
|
{
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->middleware('auth');
|
$this->middleware('auth');
|
||||||
$this->middleware('role:Admin');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to display the moons to logistics personnel
|
* Function to display the moons to logistics personnel
|
||||||
*/
|
*/
|
||||||
public function displayMoonsLogistics() {
|
public function displayMoonsLogistics() {
|
||||||
|
|
||||||
$this->middleware('permissions:logistics.manager');
|
$this->middleware('permissions:logistics.manager');
|
||||||
|
|
||||||
$lookup = new LookupHelper;
|
$lookup = new LookupHelper;
|
||||||
@@ -110,6 +108,8 @@ class MoonsAdminController extends Controller
|
|||||||
* Function to display the moons to admins
|
* Function to display the moons to admins
|
||||||
*/
|
*/
|
||||||
public function displayMoonsAdmin() {
|
public function displayMoonsAdmin() {
|
||||||
|
$this->middleware('role:Admin');
|
||||||
|
|
||||||
$lookup = new LookupHelper;
|
$lookup = new LookupHelper;
|
||||||
$contact = '';
|
$contact = '';
|
||||||
$paid = '';
|
$paid = '';
|
||||||
@@ -209,6 +209,8 @@ class MoonsAdminController extends Controller
|
|||||||
* Function to remove a renter from a moon
|
* Function to remove a renter from a moon
|
||||||
*/
|
*/
|
||||||
public function storeMoonRemoval(Request $request) {
|
public function storeMoonRemoval(Request $request) {
|
||||||
|
$this->middleware('role:Admin');
|
||||||
|
|
||||||
$this->validate($request, [
|
$this->validate($request, [
|
||||||
'remove' => 'required',
|
'remove' => 'required',
|
||||||
]);
|
]);
|
||||||
@@ -244,6 +246,8 @@ class MoonsAdminController extends Controller
|
|||||||
* Function displays the ability for admins to update moons with who is renting, and when it ends.
|
* Function displays the ability for admins to update moons with who is renting, and when it ends.
|
||||||
*/
|
*/
|
||||||
public function updateMoon() {
|
public function updateMoon() {
|
||||||
|
$this->middleware('role:Admin');
|
||||||
|
|
||||||
//Declare some variables
|
//Declare some variables
|
||||||
$system = null;
|
$system = null;
|
||||||
$planet = null;
|
$planet = null;
|
||||||
@@ -278,6 +282,8 @@ class MoonsAdminController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function storeUpdateMoon(Request $request) {
|
public function storeUpdateMoon(Request $request) {
|
||||||
|
$this->middleware('role:Admin');
|
||||||
|
|
||||||
//Declare some static variables as needed
|
//Declare some static variables as needed
|
||||||
$moonCalc = new MoonCalc;
|
$moonCalc = new MoonCalc;
|
||||||
$lookup = new LookupHelper;
|
$lookup = new LookupHelper;
|
||||||
@@ -429,6 +435,8 @@ class MoonsAdminController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function showJournalEntries() {
|
public function showJournalEntries() {
|
||||||
|
$this->middleware('role:Admin');
|
||||||
|
|
||||||
$dateInit = Carbon::now();
|
$dateInit = Carbon::now();
|
||||||
$date = $dateInit->subDays(30);
|
$date = $dateInit->subDays(30);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user