Server IP : 66.29.132.124 / Your IP : 3.147.46.174 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/home/wavevlvu/book24.ng/modules/Social/Controllers/ |
Upload File : |
<?php namespace Modules\Social\Controllers; use Illuminate\Support\Facades\Auth; use Modules\FrontendController; use Modules\Social\Models\Forum; use Modules\Social\Models\Post; class SocialController extends FrontendController { public function index(){ $data = [ 'rows'=>Post::search(['feed'=>1])->with(['user'])->paginate(20), 'forums'=>Forum::query()->where('status','publish')->get(), 'body_class'=>'social_page_body' ]; return view('Social::frontend.index',$data); } public function post_store(){ $post = new Post(); $post->content = request()->input('content'); $post->user_id = Auth::id(); $post->publish_date = date('Y-m-d H:i:s'); $post->save(); return back()->with("success",__("Success")); } }