Support the ongoing development of Laravel.io →
Configuration
Last updated 1 year ago.
0

You need to use the CommanderTrait of the Laracasts/Commander package.

0

kakirigi said:

You need to use the CommanderTrait of the Laracasts/Commander package.

0

i m working on same but after using commandTrail error is still

0
<?php namespace App\Http\Controllers; use App\Http\Requests; use App\Http\Controllers\Controller; use Input , App; use Auth; use Illuminate\Http\Request; use CommanderTrait; use App\FollowUserCommand; use App\User; use App\Social; use App\AuthenticateUser; use DB; use Laracasts\Commander\CommandHandler; class FollowsController extends Controller { /** * Display a listing of the resource. * * @return Response */ public function index(User $user) { $user=$user->get(); return view('index',compact('user')); } /** * Show the form for creating a new resource. * * @return Response */ /** * Store a newly created resource in storage. * * @return Response */ public function store() { // $input =array_add(Input::get(),'userId', Auth::id()); $input = Input::get(); $input ['userId'] = Auth::id(); $this->execute(FollowUserCommand::class , $input); Flash::success('You are now following this user'); return Redirect::back(); }
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.