showing all users post on Admin Login
0
public function index()
$user_id = auth()->user()->id;
$user = User::find($user_id);
$leave_request_form = leave_request_form::all();
return view('leave_request_form/index')->with('leave_request_form', $user->leave_request_form);
How do I make an admin view all user posts?
laravel
add a comment |
0
public function index()
$user_id = auth()->user()->id;
$user = User::find($user_id);
$leave_request_form = leave_request_form::all();
return view('leave_request_form/index')->with('leave_request_form', $user->leave_request_form);
How do I make an admin view all user posts?
laravel
1
You need to explain what you're asking. What are user posts? I dont see anything like that in your code.
– Paras
Nov 13 '18 at 19:11
Well, I created a leave request form and added a user_id column to both the leave request form and the User tables. I used @can to enable users see only the leave request form. Admin can also see the leave request form. The code above enables users and admin see only their leave request they created. Now I want the admin logged in to be able to view all the requests from all the users. I hope my question is clear now. Thanks
– solomon Dadzie
Nov 14 '18 at 21:18
add a comment |
0
0
0
1
public function index()
$user_id = auth()->user()->id;
$user = User::find($user_id);
$leave_request_form = leave_request_form::all();
return view('leave_request_form/index')->with('leave_request_form', $user->leave_request_form);
How do I make an admin view all user posts?
laravel
public function index()
$user_id = auth()->user()->id;
$user = User::find($user_id);
$leave_request_form = leave_request_form::all();
return view('leave_request_form/index')->with('leave_request_form', $user->leave_request_form);
How do I make an admin view all user posts?
laravel
laravel
edited Nov 13 '18 at 22:29
rpm192
1,3491620
1,3491620
asked Nov 13 '18 at 19:10
solomon Dadziesolomon Dadzie
1
1
1
You need to explain what you're asking. What are user posts? I dont see anything like that in your code.
– Paras
Nov 13 '18 at 19:11
Well, I created a leave request form and added a user_id column to both the leave request form and the User tables. I used @can to enable users see only the leave request form. Admin can also see the leave request form. The code above enables users and admin see only their leave request they created. Now I want the admin logged in to be able to view all the requests from all the users. I hope my question is clear now. Thanks
– solomon Dadzie
Nov 14 '18 at 21:18
add a comment |
1
You need to explain what you're asking. What are user posts? I dont see anything like that in your code.
– Paras
Nov 13 '18 at 19:11
Well, I created a leave request form and added a user_id column to both the leave request form and the User tables. I used @can to enable users see only the leave request form. Admin can also see the leave request form. The code above enables users and admin see only their leave request they created. Now I want the admin logged in to be able to view all the requests from all the users. I hope my question is clear now. Thanks
– solomon Dadzie
Nov 14 '18 at 21:18
1
1
You need to explain what you're asking. What are user posts? I dont see anything like that in your code.
– Paras
Nov 13 '18 at 19:11
You need to explain what you're asking. What are user posts? I dont see anything like that in your code.
– Paras
Nov 13 '18 at 19:11
Well, I created a leave request form and added a user_id column to both the leave request form and the User tables. I used @can to enable users see only the leave request form. Admin can also see the leave request form. The code above enables users and admin see only their leave request they created. Now I want the admin logged in to be able to view all the requests from all the users. I hope my question is clear now. Thanks
– solomon Dadzie
Nov 14 '18 at 21:18
Well, I created a leave request form and added a user_id column to both the leave request form and the User tables. I used @can to enable users see only the leave request form. Admin can also see the leave request form. The code above enables users and admin see only their leave request they created. Now I want the admin logged in to be able to view all the requests from all the users. I hope my question is clear now. Thanks
– solomon Dadzie
Nov 14 '18 at 21:18
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287968%2fshowing-all-users-post-on-admin-login%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
draft saved
draft discarded
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287968%2fshowing-all-users-post-on-admin-login%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
You need to explain what you're asking. What are user posts? I dont see anything like that in your code.
– Paras
Nov 13 '18 at 19:11
Well, I created a leave request form and added a user_id column to both the leave request form and the User tables. I used @can to enable users see only the leave request form. Admin can also see the leave request form. The code above enables users and admin see only their leave request they created. Now I want the admin logged in to be able to view all the requests from all the users. I hope my question is clear now. Thanks
– solomon Dadzie
Nov 14 '18 at 21:18