Last active
May 10, 2019 08:45
-
-
Save Sean-Spallen/a10e3ccf0fe2422bc4afc06cf7705006 to your computer and use it in GitHub Desktop.
Laravel - Store Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Flight; | |
use Illuminate\Http\Request; | |
use App\Http\Controllers\Controller; | |
class FlightController extends Controller | |
{ | |
/** | |
* Create a new flight instance. | |
* | |
* @param Request $request | |
* @return Response | |
*/ | |
public function store(Request $request) | |
{ | |
// Validate the request... | |
$flight = new Flight; | |
$flight->name = $request->name; | |
$flight->save(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment