Overview

Namespaces

  • App
    • Http
      • Controllers
        • Auth
      • Middleware
  • PHP

Classes

  • AdController
  • ApiController
  • CommentController
  • Controller
  • EmergencyController
  • NewspaperController
  • RouteController
  • TaxiController
  • UserController
  • Overview
  • Namespace
  • Class
  • Tree

Class AdController

Illuminate\Routing\Controller
Extended by App\Http\Controllers\Controller uses Illuminate\Foundation\Auth\Access\AuthorizesRequests (not available) Illuminate\Foundation\Bus\DispatchesJobs (not available) Illuminate\Foundation\Validation\ValidatesRequests (not available)
Extended by App\Http\Controllers\AdController
Namespace: App\Http\Controllers
Located at app/Http/Controllers/AdController.php
Methods summary
public mixed
# showAds( )

Returns

mixed

Gets all ads from the database with atleast one location linked to it, and passes them along when making the view.

Author

Stefano Groenland
public mixed
# showAdsEdit( )

Returns

mixed

Gets the corresponding advertisement of the route id passed, Gets all locations comma from the database and places them comma delimited in a variable for later use.

Authors

Stefano Groenland , Richard Perdaan
public
# showAdsPanel( )
public mixed
# showAdsAdd( )

Returns

mixed
Makes the reclametoevoegen view.

Author

Richard Perdaan
public Illuminate\Http\RedirectResponse
# addAd( Illuminate\Http\Request $request )

Parameters

$request

Returns

Illuminate\Http\RedirectResponse

Grabs all input values from the request, validates them and if all goes well, The advertisement will be created.

Author

Richard Perdaan & Stefano Groenland
public Illuminate\Http\RedirectResponse
# deleteAd( )

Returns

Illuminate\Http\RedirectResponse

Gets the id from the route parameter, looks for the id in the database. If found the row will be deleted from the Ad table, Aswell as the linked rows in the AdLocation table.

Author

Richard Perdaan
public Illuminate\Http\RedirectResponse
# editAd( Illuminate\Http\Request $request )

Parameters

$request

Returns

Illuminate\Http\RedirectResponse

Uses the route parameter to define which advertisement has to be edited, Gets all inputs filled in and checks them for validation. If all passed correctly the advertisement gets updated.

Author

Richard Perdaan & Stefano Groenland
public Illuminate\Http\RedirectResponse|Illuminate\Routing\Redirector
# upload( Illuminate\Http\Request $request, $id, $type )

Parameters

$request
$id
$type

Returns

Illuminate\Http\RedirectResponse|Illuminate\Routing\Redirector

Grabs the file named 'banner' from the request and uploads it onto the server, It updates the corresponding advertisement with the link to the uploaded picture as their banner in the Ad table.

Authors

Stefano Groenland
public string
# getLocationsInRadius( $radius, $lat, $lng )

Parameters

$radius
$lat
$lng

Returns

string
Uses the geobyte API for nearby cities in a radius arround the lat & long coords of a given location.

Author

Stefano Groenland
public mixed
# showAdStats( )

Returns

mixed
public array
# geoCode( $adress )

Parameters

$adress

Returns

array
Uses the Google maps Geocoding API to convert a location to geodata.

Author

Stefano Groenland
APIv1 API documentation generated by ApiGen