my post controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use App\post;
class postController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { // }
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('posts.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$post=new post;
$post->title =$request->title;
$post->body =$request->body;
$post->save();
dd("Hi");
return Redirect::to('/')
->with('success','You have been successfully subscribe to us.');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}
App\HTTP\Controllers;>
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/299TYHI
via IFTTT
Aucun commentaire:
Enregistrer un commentaire