ParkingFaqController
extends BaseController
in package
Parking FAQ Controller
This controller manages comprehensive parking FAQ operations including FAQ CRUD, DataTables integration, advanced filtering, and FAQ content management. It provides functionality for managing parking frequently asked questions with airport integration, sorting capabilities, and admin activity logging.
Table of Contents
Methods
- __construct() : void
- Create a new ParkingFaqController instance.
- create() : View
- Show the form for creating a new parking FAQ.
- destroy() : RedirectResponse
- Remove the specified parking FAQ from storage.
- edit() : View
- Show the form for editing the specified parking FAQ.
- index() : View|JsonResponse
- Display a listing of parking FAQs with DataTables integration and advanced filtering.
- show() : void
- Display detailed information for a specific parking FAQ.
- store() : RedirectResponse
- Store a newly created parking FAQ in storage.
- update() : RedirectResponse
- Update the specified parking FAQ in storage.
- upload() : JsonResponse
- Handle file uploads for parking FAQ content.
Methods
__construct()
Create a new ParkingFaqController instance.
public
__construct() : void
Checks if user is logged in and has proper permissions for parking FAQ management. Redirects to appropriate page if permissions are not met.
create()
Show the form for creating a new parking FAQ.
public
create(Request $request) : View
Displays the FAQ creation form with initialized form fields and related data. Loads airport information and states for form population. Provides interface for adding new parking FAQs with comprehensive content management options.
Parameters
- $request : Request
Return values
Viewdestroy()
Remove the specified parking FAQ from storage.
public
destroy(int $id) : RedirectResponse
Deletes the FAQ record and provides appropriate feedback message. Handles FAQ deletion with proper error handling and admin activity logging.
Parameters
- $id : int
-
Parking FAQ ID
Return values
RedirectResponseedit()
Show the form for editing the specified parking FAQ.
public
edit(int $id, Request $request) : View
Validates user permissions and FAQ ID before displaying the edit form. Includes security checks with MD5 hash validation for FAQ access. Loads existing FAQ data and related information for editing.
Parameters
- $id : int
-
Parking FAQ ID
- $request : Request
Return values
Viewindex()
Display a listing of parking FAQs with DataTables integration and advanced filtering.
public
index(Request $request) : View|JsonResponse
Provides a paginated list of parking FAQs with comprehensive search capabilities. Supports filtering by FAQ question and location ID. Includes DataTables integration with custom action buttons for view, edit, and delete operations.
Parameters
- $request : Request
Return values
View|JsonResponseshow()
Display detailed information for a specific parking FAQ.
public
show(int $id, Request $request) : void
Generates HTML table with comprehensive FAQ details including airport information, company details, contact information, and operational hours. Returns formatted HTML for modal display with all FAQ information.
Parameters
- $id : int
-
Parking FAQ ID
- $request : Request
store()
Store a newly created parking FAQ in storage.
public
store(Request $request) : RedirectResponse
Validates FAQ data and creates a new FAQ record with airport integration. Handles airport code parsing, ICAO identifier management, and admin activity logging. Provides appropriate feedback message after successful creation.
Parameters
- $request : Request
Return values
RedirectResponseupdate()
Update the specified parking FAQ in storage.
public
update(Request $request, int $id) : RedirectResponse
Validates FAQ data and updates the FAQ record with airport integration. Handles airport code parsing, ICAO identifier management, and admin activity logging. Provides appropriate feedback message after successful update.
Parameters
- $request : Request
- $id : int
-
Parking FAQ ID
Return values
RedirectResponseupload()
Handle file uploads for parking FAQ content.
public
upload(Request $request) : JsonResponse
Processes file uploads for FAQ content with validation and file management. Supports image uploads and moves files to the parking-faq uploads directory. Returns JSON response with file information for content integration.
Parameters
- $request : Request