jackym

jackym

Member Since 1 Year Ago

Experience Points 120
Experience Level 1

4,880 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 0
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

21 Jun
1 year ago

jackym left a reply on BadMethodCallException In Controller.php Line 283: Method [postEmail] Does Not Exist.

@Yorki thanks for showing me where i could debugg from i just did the following and it worked

 public function forgotPasswordSubmit(Request $request)
    {
        $user = $this->registerRepo->forgotPassword($request->username);
       
        
//var_dump($user);exit;
        if ($user) {

            $data       = new \stdClass;
            $data->user = $user;
            $data->type = "password_recover";
            
           // $status = Plugin::fire('send_email', $data);
              $response = $this->postEmail($data);
            
            echo "<pre>";
     print_r($response);
  echo "</pre>";
 exit;
            

            if(isset($status[0]['success'])) {

                session()->flash('message', trans('app.password_sent'));
                //return back()->withInput();
                return redirect('/login');
            }
                
            session()->flash('message', trans('app.try_again'));
            return back()->withInput();
        }

to this

 public function forgotPasswordSubmit(Request $request)
    {
        $user = $this->registerRepo->forgotPassword($request->username);
       
        
//var_dump($user);exit;
        if ($user) {

            $data       = new \stdClass;
            $data->user = $user;
            $data->type = "password_recover";
            
            $status = Plugin::fire('send_email', $data);
            

            if(isset($status[0]['success'])) {

                session()->flash('message', trans('app.password_sent'));
                //return back()->withInput();
                return redirect('/login');
            }
                
            session()->flash('message', trans('app.try_again'));
            return back()->withInput();
        }

Thanks so much to everyone who tried to assist.

Cheers!

jackym left a reply on BadMethodCallException In Controller.php Line 283: Method [postEmail] Does Not Exist.

@biishmar so what do you suggest should be done since am blank in this!

jackym left a reply on How To Write Code In Laracast?

just testing

jackym left a reply on BadMethodCallException In Controller.php Line 283: Method [postEmail] Does Not Exist.

@biishmar here is the usercontroller file

<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\App;
//repository use
use Auth;
use Illuminate\Http\Request;
use App\Repositories\UserRepository;
use App\Repositories\VisitorRepository;
use App\Repositories\RegisterRepository;
use App\Repositories\CreditRepository;
use App\Repositories\ProfileRepository;
use App\Repositories\EncounterRepository;
use App\Repositories\LanguageRepository;
use App\Repositories\Admin\UtilityRepository;
use App\Repositories\NotificationsRepository;
use App\Components\Theme;
use App\Components\Plugin;
use App\Models\UserSocialLogin;
use App\User;
use Hash;
use Mail;
use DB;
use stdClass;
use Validator;
use Password;
use ResetsPasswords;

class UserController extends Controller
{
    protected $userRepo;
    protected $registerRepo;
    protected $creditRepo;
    protected $profileRepo;
    protected $encounterRepo;
    protected $langRepo;
    protected $notifRepo;
    protected $visitorRepo;
    
    public function __construct(ProfileRepository $profileRepo, UserRepository $userRepo, RegisterRepository $registerRepo, CreditRepository $creditRepo, EncounterRepository $encounterRepo, LanguageRepository $langRepo, NotificationsRepository $notifRepo, VisitorRepository $visitorRepo)
    {
        $this->userRepo      = $userRepo;
        $this->registerRepo  = $registerRepo;
        $this->creditRepo    = $creditRepo;
        $this->profileRepo   = $profileRepo;
        $this->encounterRepo = $encounterRepo;
        $this->langRepo      = $langRepo;
        $this->notifRepo     = $notifRepo;
        $this->visitorRepo   = $visitorRepo;
    }   

    

    public function deactivateUser () {

        try {
            
            $auth_user_id = Auth::user()->id;
            app('App\Repositories\Admin\UserManagementRepository')->deactivateUsers([$auth_user_id]);   

            $this->userRepo->set_user_setting($auth_user_id, 'activation_status', '0');

            return response()->json(['status' => 'success']);

        } catch (\Exception $e) {
            return response()->json([
                'status' => 'error',
                'message' => $e->getMessage()
            ]);
        }
        

    }

    public function deleteUser(Request $request) {

        try {

            if ( Auth::user()->password != '' && !password_verify($request->confirm_password, Auth::user()->password) ) {
                return response()->json(['status' => 'error']);
            } 


            $auth_user_id = Auth::user()->id;
            app('App\Repositories\Admin\UserManagementRepository')->delete_users_permenently([$auth_user_id]);
            
            Plugin::fire('users_deleted', [ [$auth_user_id] ]);
            

            return response()->json(['status' => 'success']);

        } catch (\Exception $e) {
            return response()->json([
                'status' => 'error',
                'message' => $e->getMessage()
            ]);
        }
            
    }



    public function save_left_fields (Request $request) {

        $user = Auth::user();

        //creating validator for login requests
        $validator = $this->userRepo->registerValidate($request->all(), $user->id);
        $errors    = $this->userRepo->formatErrors($validator->errors());

        //if input validation fails then response validation failed
        if ($validator->fails()) {
            
            return response()->json([
                'status' => 'error',
                'errors' => $errors
            ]);

        }
        
        


        $should_fire = false;
        if ($user->latitude == null || $user->longitude == null) {
            $should_fire = true;
        }

        /*insert user information to user table 
        and also create one row in profile table with same userid */
        try {
            
            $arr             = $request->all();
            
            $prev_gender     = $user->gender;
            $user->username  = $arr['username'];
            $user->name      = $arr['name'];
            $user->latitude  = $arr['lat'];
            $user->longitude = $arr['lng'];
            $user->gender    = $arr['gender_val'];
            $user->city      = ($arr['city'] == "undefined") ? "" : $arr['city'];
            $user->country   = $arr['country'];
            $user->dob       = \DateTime::createFromFormat('d/m/Y', $arr['dob']);
            $user->save();

            $user->createAndSaveSlugName();

            $sections = $this->profileRepo->get_fieldsections();
            
            $user_fields = [];
            foreach ($sections as $section) {
                foreach ($section->fields as $field) {
                    if ($field->on_registration == 'yes') {
                        $code = $field->code;


                        if($field->type == "text" || $field->type == 'textarea') {

                            if(isset($request->$code) && strlen($request->$code) > 0) {
                                $user_fields[$field->id] = $request->$code;
                            } else {
                                return response()->json([
                                    "status" => "error", 
                                    "errors" => [
                                        "custom_field" => trans('admin.require_attr', ['attr' => trans('custom_profile.'.$code)])
                                    ] 
                                ]);
                            }

                        } else {

                            if(isset($request->$code) && intval($request->$code) != 0) {
                                $user_fields[$field->id] = $request->$code;
                            } else {
                                return response()->json([
                                    "status" => "error", 
                                    "errors" => [
                                        "custom_field" => trans('admin.require_attr', ['attr' => trans('custom_profile.'.$code)])
                                    ] 
                                ]);
                            }

                        }

                    }
                }
            }
            $this->profileRepo->saveUserFields($user->id, $user_fields);
            $gender['user_id'] = $user->id;
            $gender['value']   = $request->gender_val;
            $this->profileRepo->saveGender($gender); 

            $defaul_gender_picture = UtilityRepository::get_setting("default_".$user->gender);
            $prev_default_gender_picture   = UtilityRepository::get_setting("default_".$prev_gender);
            if ($user->profile_pic_url == $prev_default_gender_picture) {
                $user->profile_pic_url = $defaul_gender_picture;
                $user->save();
            }

            session()->forget('data_incomplete');
            if ($should_fire) 
                Plugin::fire('account_create', $user);

            return response()->json(['status' => 'success']);

        } catch (\Exception $e) {

            return response()->json(['status' => 'error', 'errors' => [$e->getMessage()] ]);

        }
    }
    
    public function save_privacy_settings(Request $request)
    {
        $user = Auth::user();
        $user->settings_save('online_status',$request->online_status);
        $user->settings_save('show_distance',$request->show_distance);
        return response()->json([
                    'status'  => 'success', 
                ]);
    }

    public function save_notif_settings(Request $request)
    {
        $this->notifRepo->set_notif_settings($request->all(),Auth::user()->id);

        return redirect('settings');
    }

    public function social_verification($id)
    {
        $arr = array();
        $user = $this->userRepo->getSocialAccounts($id);
        foreach($user as $u)
        {
            if($u->src == 'facebook')
                $arr['facebook'] = 1;
            if($u->src == 'google')
                $arr['google'] = 1;
        }
       
        return $arr;
    }

    public function changeEmail(Request $request)
    {
        
        $valid = Validator::make($request->all(), [
            'email'  => 'required|max:100|email|unique:user,username',
        ]);

        if ($valid->fails ()) {
            $messages = $valid->errors()->all();
            return response()->json(['status'=>'error','message'=>$messages[0]]);
        }

        $user  = Auth::user();
        $email = $request->email;

        $this->userRepo->changeEmail($user, $email);

        $email_array       = new stdCLass;
        $email_array->user = $user;
        $email_array->type = "change_email";

        Plugin::fire('send_email', $email_array);

        return response()->json([
            'status'  => 'success', 'message' => trans('app.success_change_email')
        ]);
    }

    public function changePassword(Request $request)
    {
        $user    = Auth::user();
        $oldPass = $request->oldPassword;


        if ($user->password == '' || password_verify($oldPass, $user->password)) {

            if ($request->password == $request->confirm_password) {

                $newPass = Hash::make($request->password);
                $user->password = $newPass;
                $user->save();
            
            } else {

                return response()->json(['status'  => trans('app.password_no_match')]);
            }
        } else {

            return response()->json(['status'  => trans('app.wrong_password')]);   
        }
   
        $email_array       = new stdCLass;
        $email_array->user = $user;
        $email_array->type = "change_password";

        Plugin::fire('send_email', $email_array);

        return response()->json([
            'status'  => 'success','message' => trans('app.password_change')
        ]);
    }

    public function settings() {

        $logId              = Auth::user()->id;
        $arr                = array();
        $logUser            = Auth::user();
        $like               = $this->encounterRepo->getAllLikes($logId);
        $languages          = $this->langRepo->getSupportedLanguages();
        $notif_settings     = $this->notifRepo->getNotificationSettings($logId);
        $privacy_settings   = $this->userRepo->getPrivacySettings($logId);
        $invisible_settings = $this->userRepo->getInvisibleSettings($logId);
        $user_password      =($logUser->password == '') ? false : true; 

        return Theme::view('settings', [

            'logUser'            => $logUser,
            'languages'          =>$languages,
            'notif_settings'     => $notif_settings,
            'privacy_settings'   => $arr,
            'like'               =>$like,
            "invisible_settings" => $invisible_settings,
            "privacy_settings"   => $privacy_settings,
            "user_password"      => $user_password

        ]);
    }

    public function setUserLanguage (Request $request) {

        try {

            if (!$request->language) {

                return response()->json(['status' => 'error']);

            }

            $user = Auth::user();
            $user->language = $request->language;
            $user->save();

            return response()->json(['status' => 'success']);

        } catch (\Exception $e) {

            return response()->json(['status' => 'error']);

        }

    }

    //email activation
    public function sampleActivate ($id,$token) {
        
        $success = $this->registerRepo->activateUser($id,$token);
        session()->flash('account_activation', (($success) ? 'true' : 'false'));            
        
        return redirect('/login');    
    }

   // password reset
    public function forgotPassword()
    {
        
        //die($id);
        //echo $request;exit;
        //return Theme::view('forgotpassword_view');
        return Theme::view('auth/forgotp');
    
    }

    public function forgotPasswordSubmit(Request $request)
    {
        $user = $this->registerRepo->forgotPassword($request->username);
       
        
//var_dump($user);exit;
        if ($user) {

            $data       = new \stdClass;
            $data->user = $user;
            $data->type = "password_recover";
            
            //$status = Plugin::fire('send_email', $data);
            $response = $this->postEmail($data);
echo "<pre>";
print_r($response);
echo "</pre>";
exit;
            if(isset($status[0]['success'])) {

                session()->flash('message', trans('app.password_sent'));
                //return back()->withInput();
                return redirect('/login');
            }
                
            session()->flash('message', trans('app.try_again'));
            return back()->withInput();
        }

        //session()->flash('message', trans('app.valid_email'));
        return redirect()->back()->with(['error'=>'User not found!']);
        
    }

    public function reset($id,$token)
    {
        return Theme::view('auth/forgotpassword', array('id'=>$id,'token'=>$token));
    
    }

    public function resetPassword(Request $request)
    {
        $response = $this->registerRepo->resetPasswordSubmit($request->id, $request->token, $request->password , $request->confirmPassword);
        if($response == true)
            return redirect('/login')->with('message', trans('app.new_password_set'));
        else
            return redirect('reset/'.$request->id.'/'.$request->token)->with('message', trans('app.enter_password_correctly'));
    }

}

Thanks

jackym left a reply on BadMethodCallException In Controller.php Line 283: Method [postEmail] Does Not Exist.

@snapey i have edited the original question kindly check and assist. thanks

jackym left a reply on BadMethodCallException In Controller.php Line 283: Method [postEmail] Does Not Exist.

Hi Sergiu17, the following is the code for my app/http/routes.php

<?php
use Illuminate\Support\Facades\Storage;
use App\Components\Api;
use App\Models\Settings;

use App\Models\User;

use App\Components\Presenter;

use App\Components\Plugin;
use App\Components\Theme;

use App\Repositories\TestUserRepository;

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/


Route::get('/core.js', function(){
    
    $user_gift_sent = trans('app.gift_sent_central_notif_text');
    $admin_set_default_photo = trans('ContentModerationPlugin.photo_moved_to_alubm');
    $admin_deleted_photo = trans('ContentModerationPlugin.photo_deleted_by_admin');

    $fortumo_payment_processing = trans('app.fortumo_payment_process_notif_text');
    $fortumo_credits_payment_processing_completed = trans('app.fortumo_credit_purchase_notif_text');
    $fortumo_superpower_payment_processing_completed = trans('app.fortumo_superpower_purchase_notif_text');

    $photo_comment = trans('PhotoCommentsPlugin.user_comment_on_photo');
    $photo_comment_reply = trans('PhotoCommentsPlugin.user_replied_on_comment');

    $user_accepted_pvt_photos_request = trans('PrivatePhotosPlugin.accecpt_photo_request_notif_text');

    return view("corejs", [
        "user_gift_sent" => $user_gift_sent,
        "admin_set_default_photo" => $admin_set_default_photo,
        "admin_deleted_photo" => $admin_deleted_photo,
        "fortumo_payment_processing" => $fortumo_payment_processing,
        "fortumo_credits_payment_processing_completed" => $fortumo_credits_payment_processing_completed,
        "fortumo_superpower_payment_processing_completed" => $fortumo_superpower_payment_processing_completed,
        "photo_comment" => $photo_comment,
        "photo_comment_reply" => $photo_comment_reply,
        "user_accepted_pvt_photos_request" => $user_accepted_pvt_photos_request,
    ]);
    
});

Route::get("/test_event", function(){
    
    
    Plugin::add_hook("test_event", function($args){
            
            // anything to process or modify before passing the $args to all the listeners of this hook
            
            Plugin::apply_hooks("test_event", $args);
            
        });
    
    Plugin::hook("test_event", "App\Events\[email protected]");
    
    Plugin::fire("test_event", array());
    
    
});


Route::get("/test_repository", function(){
    
    $userR = new TestUserRepository();
    dd($userR->where("email", "[email protected]"));
    
});

Route::get("/sync_plugins", function(){
    
    
    // App\Components\Plugin::syncWithConfig();
    
    /* $themeRepo    = app('App\Repositories\Admin\ThemeManageRepository');
    $themeRepo->syncWithConfig(); */
    /*
    $field_options = App\Models\FieldOptions::all();
    $arr = array();
    foreach($field_options as $field){
        
        $f = new \stdClass;
        $f->id = $field->id;
        $f->field_id = $field->field_id;
        $f->name = $field->name;
        $f->code = $field->code;
        $arr[$field->id] = serialize($f);
        
    }
    
    $arrayString = var_export($arr, true);
        $arrayString = "<?php return \n {$arrayString};"; 
        file_put_contents(config_path("fieldoptions.php"), $arrayString, LOCK_EX);
     */
     App\Models\Fields::syncWithConfig();
     
     //dd(app("App\Models\Fields")->getBySectionId(4));
     //dd(app("App\Models\Fields")->where("id", 22)->first()->field_options);
    
});


Route::get('/.well-known/acme-challenge/CTn5bRtQxqzqtDuuP-PUeR8J6b65Wne2oxJDpnDS0-w', function(){

    echo "CTn5bRtQxqzqtDuuP-PUeR8J6b65Wne2oxJDpnDS0-w.C2MxKr8fxsjMyNQ8F_GdbohKfgho-xCOc7ZXtWHXNV0";

});


Route::get("/sync_settings", function(){
    app('App\Models\Settings')->syncSettingsWithDatabase();
    dd(config('settings'));
    
});


Route::get('sitemap.xml', function(){

header('Content-Type: text/xml');
echo Storage::get('sitemap.xml');

});

Route::get('/download/datingframework', function(){

    $pathToFile = public_path('datingframework.zip');
    return response()->download($pathToFile);

});


Route::group(['middleware' => 'auth'], function () {

    Route::post('user/deactivate', '[email protected]');
    Route::post('user/delete', '[email protected]');

    Route::post('/save_user_fields', '[email protected]');
    Route::post('/save_left_fields', '[email protected]_left_fields');
    Route::post('user/blocked_by_auth_user', '[email protected]');
    Route::post('user/blocked_auth_user', '[email protected]');

    Route::post('/user/online/status', '[email protected]');

    Route::post('user/get/common_interests', '[email protected]');

    Route::post('/photo/report', '[email protected]');


    Route::post('/user/language/set', '[email protected]');


    Route::post('/user/photos', '[email protected]');
    Route::post('/user/profile_picture/change', '[email protected]');
    Route::post('/user/photo/delete', '[email protected]');

    // Route::get('/', '[email protected]');
    Route::get('/home', '[email protected]');

    Route::get('/liked', '[email protected]');
    Route::get('/wholiked', '[email protected]');

    Route::get('/profile/{id}', "[email protected]");

    Route::get('user/{slug_name}', "[email protected]");


    
    Route::post('/user/profile/basic_info/update', '[email protected]');
    Route::post('user/profile/personal_info/update', '[email protected]');
    Route::post('user/profile/location/update', '[email protected]');
    Route::post('user/profile/aboutme/update', '[email protected]');
    Route::post('user/profile/hereto/update', '[email protected]');

    Route::post('/user/profile_picture/upload', '[email protected]');

    Route::post('profile/uploadphoto', '[email protected]');
    Route::post('profile/submitaccountinfo', '[email protected]');
    Route::post('profile/submitpersonalinfo', '[email protected]');
    Route::post('profile/submitaboutme', '[email protected]');

    //suggestions route
    Route::get('/interest_suggestions/', '[email protected]');
    Route::post('/profile/interest/add', '[email protected]');
    Route::post('/profile/interest/delete', '[email protected]');
    Route::post('profile/interests/get', '[email protected]');

    //block user routes
    Route::get('/blockusers', '[email protected]');
    Route::post('/user/block', '[email protected]');
    Route::post('/user/unblock', '[email protected]');

    Route::get('/logout', 'Auth\[email protected]');
    
    // credits
    Route::post('activatesuperpowerpack', '[email protected]');
    Route::get('credits', '[email protected]');
    Route::post('addCredits', '[email protected]');
    
    Route::post('credits', '[email protected]');
    Route::post('superpower', '[email protected]');
    Route::post('credits_callback', '[email protected]_callback');
    Route::post('superpower_callback', '[email protected]_callback');

    Route::post('/changeEmail', '[email protected]');
    Route::post('/changePassword', '[email protected]');
    Route::post('/save_privacy_settings', '[email protected]_privacy_settings');

    Route::post('/user/report', '[email protected]');
    Route::post('/social_verification/{id}', '[email protected]_verification');
    Route::post('/isSuperPowerActivated/{id}', '[email protected]');   

    Route::post('/activate_invisible_mode', '[email protected]_invisible_mode');
    Route::post('/deactivate_invisible_mode', '[email protected]_invisible_mode');

    Route::post('/save_notif_settings', '[email protected]_notif_settings');
    Route::post('/save_invisible_settings', '[email protected]_invisible_settings');

    Route::get('settings', '[email protected]');
    Route::get('get_all_users', '[email protected]');
    
    Route::post("/credits/payment", "[email protected]");
    
    Route::get("/payment/packages", "[email protected]_packages");
});

Route::post('credits_callback', '[email protected]_callback');
Route::post('superpower_callback', '[email protected]r_callback');

Route::get('/login', 'Auth\[email protected]');
Route::post('/login', 'Auth\[email protected]');
Route::get('/logout','Auth\[email protected]');


//routes for registration
Route::get('/', 'Auth\[email protected]');
Route::get('/register', 'Auth\[email protected]');
Route::post('/register', 'Auth\[email protected]');









//routes for admin panel
// Route::get('admin/users', '[email protected]');
// Route::get('admin/users/delete/{id}/page/{no}', '[email protected]');
// Route::get('admin/users/activate/{id}/page/{no}', '[email protected]');


//email verification
Route::get('/sample/activate/{id}/{val}', '[email protected]');
Route::get('/sample', '[email protected]');
//password reset
Route::get('/forgot', '[email protected]');
Route::post('/forgotPassword/submit', '[email protected]'); 
Route::get('/reset/{id}/{val}', '[email protected]');                    
Route::post('/resetPassword', '[email protected]');          





// stripe 
Route::get('stripe', '[email protected]');
Route::post('charge/{amount}', '[email protected]');


/* mobile api routes */
Api::route('login', 'Api\[email protected]', 'no-api');
Api::route('forgot-password', 'Api\[email protected]', 'no-api');
Api::route('get-custom-fields', 'Api\[email protected]', 'no-api');
Api::route('register', 'Api\[email protected]', 'no-api');

Api::route('profile/me', 'Api\[email protected]');
Api::route('profile', 'Api\[email protected]');
Api::route('profile/me/change-photo', 'Api\[email protected]');
Api::route('profile/me/upload-profile-picture', 'Api\[email protected]');
Api::route('profile/me/upload-other-photos', 'Api\[email protected]');
Api::route('profile/me/delete-photo', 'Api\[email protected]');
Api::route('profile/me/update-basic-info', 'Api\[email protected]');
Api::route('profile/me/update-location', 'Api\[email protected]');
Api::route('profile/me/add-interest', 'Api\[email protected]');
Api::route('profile/me/get-interest-suggestions', 'Api\[email protected]');
Api::route('profile/me/delete-interest', 'Api\[email protected]');
Api::route('profile/me/update-aboutme', 'Api\[email protected]');
Api::route('profile/me/update-custom-fields', 'Api\[email protected]');

Api::route('user/blocks', 'Api\[email protected]');
Api::route('user/block', 'Api\[email protected]');
Api::route('user/unblock', 'Api\[email protected]');


Api::route('report/user', 'Api\[email protected]');
Api::route('report/photo', 'Api\[email protected]');


Api::route('settings', 'Api\[email protected]');
Api::route('settings/change/email', 'Api\[email protected]');
Api::route('settings/change/password', 'Api\[email protected]');
Api::route('settings/save/notification', 'Api\[email protected]');
Api::route('settings/save/privacy', 'Api\[email protected]');
Api::route('settings/save/invisible', 'Api\[email protected]');
Api::route('settings/save/language', 'Api\[email protected]');
Api::route('settings/user/deactivate', 'Api\[email protected]');
Api::route('settings/user/delete', 'Api\[email protected]');


Route::get('/test', function(){

    $user = User::with('profile')->find(103);
    
    dd($user->toArray());

});


Route::get("presenter",function(){
    
    return Presenter::view(explode('.', "test"), array("title" => "dha"));
});

Thanks

jackym started a new conversation BadMethodCallException In Controller.php Line 283: Method [postEmail] Does Not Exist.

Hi guys am new to laravel and am trying to reset password using the forgot password function and the following is what i get after inputting the email address. BadMethodCallException in Controller.php line 283: Method [postEmail] does not exist. in Controller.php line 283 at Controller->__call('postEmail', array(object(stdClass))) in UserController.php line 392 at UserController->forgotPasswordSubmit(object(Request)) at call_user_func_array(array(object(UserController), 'forgotPasswordSubmit'), array(object(Request))) in Controller.php line 256 at Controller->callAction('forgotPasswordSubmit', array(object(Request))) in ControllerDispatcher.php line 164 at ControllerDispatcher->call(object(UserController), object(Route), 'forgotPasswordSubmit') in ControllerDispatcher.php line 112 at ControllerDispatcher->Illuminate\Routing{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102 at Pipeline->then(object(Closure)) in ControllerDispatcher.php line 114 at ControllerDispatcher->callWithinStack(object(UserController), object(Route), object(Request), 'forgotPasswordSubmit') in ControllerDispatcher.php line 68 at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\UserController', 'forgotPasswordSubmit') in Route.php line 203 at Route->runWithCustomDispatcher(object(Request)) in Route.php line 134 at Route->run(object(Request)) in Router.php line 708 at Router->Illuminate\Routing{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102 at Pipeline->then(object(Closure)) in Router.php line 710 at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 674 at Router->dispatchToRoute(object(Request)) in Router.php line 635 at Router->dispatch(object(Request)) in Kernel.php line 236 at Kernel->Illuminate\Foundation\Http{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 139 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in VerifyCsrfToken.php line 40 at VerifyCsrfToken->handle(object(Request), object(Closure)) at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in ShareErrorsFromSession.php line 49 at ShareErrorsFromSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in StartSession.php line 62 at StartSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in EncryptCookies.php line 59 at EncryptCookies->handle(object(Request), object(Closure)) at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in CheckForMaintenanceMode.php line 44 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 124 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102 at Pipeline->then(object(Closure)) in Kernel.php line 122 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 87 at Kernel->handle(object(Request)) in index.php line 53

Kindly assist. Thanks Jackie