BikashKatwal

BikashKatwal

Member Since 2 Months Ago

Experience Points
3,130
Total
Experience

1,870 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
17
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.

Level 1
3,130 XP
Sep
16
1 month ago
Activity icon

Replied to Creating A POST API To Save Many Relational Data

My raw data to POST

{
    "question":"What is you Mobile?",
    "question_image_url":"",
     "category_id":2,
    "question_type":1,
    "option1":{"answer": "Apple", "is_correct": 1},
    "option2":{"answer": "Samsung", "is_correct": 0},
    "option3":{"answer": "Oppo", "is_correct": 0},
    "option4":{"answer": "Huwaii", "is_correct": 0}
}

and I followed the below code to save the data

 $question = new Question();
        $question->question = $request->question;
        $question->question_image_url = $request->question_image_url;
        $question->category_id = $request->category_id;
        $question->question_type = $request->question_type;
        $question->save();
        $question->answers()->saveMany([
            new Answer(['answer' => $request->input('option1')['answer'], "is_correct" => $request->input('option1')['is_correct']]),
            new Answer(['answer' => $request->input('option2')['answer'], "is_correct" => $request->input('option2')['is_correct']]),
            new Answer(['answer' => $request->input('option3')['answer'], "is_correct" => $request->input('option3')['is_correct']]),
            new Answer(['answer' => $request->input('option4')['answer'], "is_correct" => $request->input('option4')['is_correct']]),
        ]);

        return response([
            'data' => new QuestionResource($question)
        ]);

and my get request returns:

{
    "data": [
        {
            "question": "What is you laptop name?",
            "answer": "Dell",
            "url": null,
            "category": 2,
            "type": 1,
            "options": [
                "Apple",
                "Gigabyte",
                "Dell",
                "Lenevo"
            ]
        },
        {
            "question": "What is you Mobile?",
            "answer": "Apple",
            "url": null,
            "category": 2,
            "type": 1,
            "options": [
                "Huwaii",
                "Oppo",
                "Samsung",
                "Apple"
            ]
        }
    ]
}

Is the GET request correc?

Did I follow the correct way or is there still a place for improvement. What can be done for reducing the line of code?

Thank you for providing an idea.

Activity icon

Replied to How To Use Php Artisan In Vagrant/Homestead

comminting //'Way\Generators\GeneratorsServiceProvider', in config\app.php fixed the issue.

Activity icon

Replied to Composer Trying To Install Appointedd/appointedd-php

we do not need to install appointedd inorder to implement. We can get info in https://www.appointedd.com/developers

Activity icon

Replied to Adding Any Thing In App.php's Providers Crashes The Application

commenting //'Way\Generators\GeneratorsServiceProvider',in config/app.php fixed the issue.

Activity icon

Replied to Adding CoreUI React Admin Template In Laravel Project

I have downloaded the template and using

https://github.com/barryvdh/laravel-cors

I have connected laravel api and react admin template. However, react is a standalone project. If someone can integrate the CoreUI in Laravel project to execute in the same port. Please feel free to share.

Activity icon

Replied to Creating A POST API To Save Many Relational Data

Thanks @snapey, but I am getting "message": "Illegal string offset 'answer' ", error.

public function store(QuestionRequest $request)
    {

        return $request->option1['answer'];

        $question = new Question();
        $question->question = $request->question;
        $question->question_image_url = $request->question_image_url;
        $question->category_id = $request->category_id;
        $question->question_type = $request->question_type;
        $question->save();
        $question->answers()->saveMany([
            new Answer(['answer' => $request->option1['answer'], "is_correct" => $request->option1['is_correct']]),
            new Answer(['answer' => $request->option2['answer'], "is_correct" => $request->option2['is_correct']]),
            new Answer(['answer' => $request->option3['answer'], "is_correct" => $request->option3['is_correct']]),
            new Answer(['answer' => $request->option4['answer'], "is_correct" => $request->option4['is_correct']]),
        ]);

        return response([
            'data' => new QuestionResource($question)
        ]);
    }
Activity icon

Replied to Creating A POST API To Save Many Relational Data

In addition,

public function store(QuestionRequest $request)
    {
        return $request->all();

//        foreach ($request->all('option1') as $opt){
//           return $opt->answer;    //Not working
//        }
        
        
//        $question = new Question();
//        $question->question = $request->question;
//        $question->question_image_url = $request->question_image_url;
//        $question->category_id = $request->category_id;
//        $question->question_type = $request->question_type;
//        $question->save();
//        $question->answers()->saveMany([
//            new Answer(['answer' => "Kancha", "is_correct" => false]),
//            new Answer(['answer' => "Kanchi", "is_correct" => true]),
//            new Answer(['answer' => "Kanchi", "is_correct" => false]),
//            new Answer(['answer' => "Kanchi", "is_correct" => false]),
//        ]);
//
//        return response([
//            'data' => new QuestionResource($question)
//        ]);
    }

-----------------------request-------------------------

{
    "question": "What is your horse name?",
    "question_image_url": null,
    "category_id": "1",
    "question_type": "2",
    "option1": "['answer': \"Kancha\", \"is_correct\" : false]",
    "option2": "['answer' : \"Kancha\", \"is_correct\": false]",
    "option3": "['answer' : \"Kancha\", \"is_correct\" : true]",
    "option4": "['answer': \"Kancha\", \"is_correct\" : false]"
}

This is a request returned while posting the data, and this is how I am planning to do, but I am not sure of the correct process to follow in this scenario.

I am trying to get answer and is_correct from the request and using below saveMany want to store in the Answer table.

        $question->answers()->saveMany([
            new Answer(['answer' => "Kancha", "is_correct" => false]),
            new Answer(['answer' => "Kanchi", "is_correct" => true]),
            new Answer(['answer' => "Kanchi", "is_correct" => false]),
            new Answer(['answer' => "Kanchi", "is_correct" => false]),
        ]);
Sep
15
1 month ago
Activity icon

Started a new conversation Creating A POST API To Save Many Relational Data

 $question = new Question();
        $question->question = $request->question;
        $question->question_image_url = $request->question_image_url;
        $question->category_id = $request->category_id;
        $question->question_type = $request->question_type;
        $question->save();
        $question->answers()->saveMany([
            new Answer(['answer' => "Kancha", "is_correct" => false]),
            new Answer(['answer' => "Kanchi", "is_correct" => true]),
            new Answer(['answer' => "Kanchi", "is_correct" => false]),
            new Answer(['answer' => "Kanchi", "is_correct" => false]),
        ]);

        return response([
            'data' => new QuestionResource($question)
        ]);

In the code above, saving many answer is manually done, but I have to create a POST API to saveMany Answer. Could you please suggest me how to create POST Api in this case and get the request in controller.

Sep
14
1 month ago
Activity icon

Replied to Store Options In Database

Thank you @tray2 and @snapey

Activity icon

Replied to Store Options In Database

Thank you @tray2.

$post->comments()->saveMany([
    new App\Comment(['message' => 'A new comment.']),
    new App\Comment(['message' => 'Another comment.']),
]);

https://laravel.com/docs/6.x/eloquent-relationships#the-save-method

Is the solutions provided by you is similar to the example provided in documents.

Activity icon

Replied to Store Options In Database

I am having a problem while storing options in Answer table. When admin submit the form questions and answers should be stored in the table, because of the 4 options should save on Answer when Admin submits the form. The answer will save in 4 rows with is_correct column to be true.

Schema::create('answers', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('question_id')->references('id')->on('questions')->onDelete('cascade');;
            $table->string('answer');
            $table->boolean('is_correct');
            $table->timestamps();
        });
Activity icon

Replied to Store Options In Database

Any Questions with 4 options and 1 correct answer. Question on the questions table and options on the Answer table.

Activity icon

Replied to Store Options In Database

I am creating an Admin panel, where I have to store the questions and answers in the database based on the defined relationship.

Activity icon

Started a new conversation Store Options In Database

I have created questions and Answers Model where I have to store many answers/options for one questions, choosing one correct answer.

class Question extends Model
{
    protected $guarded=[];

    public function answers(){
        $this->hasMany(Answer::class);
    }
}



class Answer extends Model
{
    protected $guarded=[];
    public function question()
    {
        $this->belongsTo(Question::class);
    }
}

Schema::create('questions', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('question');
            $table->string('question_image_url')->nullable();
            $table->integer('category_id');
            $table->integer('question_type');//easy-0, medium-1, difficult-2
            $table->timestamps();
        });


Schema::create('answers', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('question_id')->references('id')->on('questions')->onDelete('cascade');;
            $table->string('answer');
            $table->boolean('is_correct');
            $table->timestamps();
        });

I am planning to store question and answer record on submit. Please help me to solve this issue.

Sep
10
1 month ago
Activity icon

Started a new conversation Adding CoreUI React Admin Template In Laravel Project

How can we add CoreUI react admin template to laravel 6.0 project?

Aug
22
1 month ago
Activity icon

Replied to Eloquent Relationship

@ftiersch Thank you

class Group extends Eloquent {

    public function users()
    {
        return $this->belongsToMany('User');
    }

}


class User extends Eloquent {

    public function groups()
    {
        return $this->belongsToMany('Group', 'users_groups');
    }
}

This is the relationship between users and group.

Activity icon

Started a new conversation Eloquent Relationship

I have users, users_group, and groups containing user details in the users table, groups(1. Admin, 2 Manager) and users_groups table contains user_id and group_id.

To display user with its group I have done

foreach ($users as $user) {
                    $group = $user->groups;
                    $usersData[] = array(
                        $user->first_name . " " . $user->last_name,
                        $user->email,
                        $group->name,
                    );
                }


where 
$group: {items=>[1]}
$group->name

but when I try to get the name from $group->name , I am not getting the value. How can I get group name in this case.

Aug
21
1 month ago
Activity icon

Replied to Convert BLOB In String

Please ignore this question.

Activity icon

Started a new conversation Convert BLOB In String

I have a database column location and the data is saved in BLOB, I guess it contains all the Street Number, Street,City. How can we display address in the list.

Activity icon

Replied to Excel Export Button Routes Not Working

Thanks, @tykus, it worked. I have been learning so much from laracasts discussion.

Activity icon

Started a new conversation Excel Export Button Routes Not Working

I have an Export button in the index page when the user clicks the Export button I want the data to be exported to an Excel sheet. In this case, do I need to add routes? because I am not redirecting it to any pages. I just want data to be exported to an Excel sheet. I am new to this environment and I am trying to understand routes as well.

I have been trying to

In routes.php

Route::group(array('prefix' => 'admin', 'before' => 'auth.admin'), function()
{   
    Route::resource('halls', 'HallsAdminController');

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

    Route::post('halls/{id}', '[email protected]');
    Route::get('halls/{id}/create/{step}', '[email protected]');
    Route::get('halls/{id}/edit/{step}', '[email protected]');
    Route::get('halls/{id}/images/{image_id}/delete', '[email protected]_image');
    
});

In Index.php

 <div class="controls">
            <a href="{{ url('admin/halls/export') }}" class="new">Export</a>
 </div>


In HallsAdminController.php

public function export(){
    
        dd("Export Clicked");
    }

but it is not hitting export function, what am I doing wrong. Please help me.

Activity icon

Replied to How To Use Php Artisan In Vagrant/Homestead

@bobbybouwmann @snapey This is an existing project in laravel 4, so I am not sure what the developers have done for dumping or for error handling. I am new to the environment and learning laravel 5.8 in which artisan commands run easily, but following the same in this projects doesn't work. Could you please suggest me how website dumping is done or error handling is done for both responses.

Thank you for the help.

Aug
20
1 month ago
Activity icon

Replied to Adding Any Thing In App.php's Providers Crashes The Application

The html mentioned above is public/index.php

Activity icon

Replied to How To Use Php Artisan In Vagrant/Homestead

I am using Windows and I get the following index.php when I try executing the php artisan commands.

</html>[email protected]:~/halls$ php artisan list
<!DOCTYPE html>
<!--[if lt IE 7]>          <html class="no-js ie lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>             <html class="no-js ie lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>             <html class="no-js ie lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js ie" lang="en"> <!--<![endif]-->
        <head>
                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <title>Halls for Hire</title>
                <meta name="description" content="">
                <meta name="viewport" content="width=device-width, initial-scale=1">

                <link rel="shortcut icon" href="http://localhost/favicon.ico">
                <link rel="apple-touch-icon" href="http://localhost/apple-touch-icon.png">

                <link rel="stylesheet" href="http://localhost/styles/app.css">

                <script src="http://localhost/scripts/vendor/modernizr.min.js"></script>

                <script>
                        var _gaq = _gaq || [];
                                _gaq.push(['_setAccount', 'UA-32397342-1']);
                                _gaq.push(['_trackPageview']);

                        (function() {
                                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                        })();
                                        </script>

        </head>
        <body class="">
                <!--[if lt IE 7]>
                        <div class="alert-box error browsehappy" data-alert>You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience. <a href="#" class="close">&times;</a></div>
                <![endif]-->
                <header id="header">
                                        <h1 id="title"><a href="http://localhost" class="sprite logo-header">Halls For Hire</a></h1>
                        <div id="user" class="show-for-medium-up">
                                                <a href="http://localhost/login" class="login"><i class="fa fa-lock "></i> Log In</a>
                                <a href="http://localhost/register" class="button secondary radius"><i class="fa fa-bullhorn "></i> List Your Hall</a>
        </div>                          </header>

                <section id="main">


                        <div class="wrap center">
        <h3>Error occurred!</h3>
        <p>An unknown error has occurred.</p>
        <p><a href="http://localhost">Return Home</a></p>
</div>
                </section>

                <footer id="footer">
                        <div class="wrap">
                                <div class="row">
                                        <div class="medium-3 columns">
                                                <h6><i><strong>&copy;</strong></i> Halls for Hire</h6>
                                                <nav>
                                                        <a href="http://localhost/conditions"><i class="fa fa-list-alt "></i> Terms &amp; Conditions</a>
                                                        <a href="http://localhost/contact"><i class="fa fa-envelope-o "></i> Contact Halls for Hire</a>
                                                </nav>
                                        </div>
                                        <div class="medium-3 columns">
                                                <h6><i class="fa fa-list "></i> Navigation</h6>
                                                <nav>
                                                        <a href="/"><i class="fa fa-search "></i> Search Halls</a>
                                                        <a href="http://localhost/halls"><i class="fa fa-list-alt "></i> Browse Halls</a>
                                                        <a href="http://localhost/about"><i class="fa fa-question-circle "></i> About</a>
                                                        <a href="http://localhost/pricing"><i class="fa fa-money "></i> Pricing</a>
                                                        <!-- <a href="http://localhost/community"><i class="fa fa-users "></i> Community</a> -->
                                                </nav>
                                        </div>
                                        <div class="medium-3 columns">
                                                <h6><i class="fa fa-user "></i> Members</h6>
                                                <nav>
                                                        <a href="http://localhost/login" class="login"><i class="fa fa-lock "></i> Log In</a>
                                                        <a href="http://localhost/register"><i class="fa fa-bullhorn "></i> List Your Hall</a>
                                                </nav>
                                        </div>
                                        <div class="medium-3 columns">
                                                <h6><i class="fa fa-thumbs-up "></i> Get Social</h6>
                                                <nav>
                                                        <a href="https://www.facebook.com/" target="_blank"><i class="fa fa-facebook "></i> Facebook</a>
                                                        <a href="https://twitter.com/" target="_blank"><i class="fa fa-twitter "></i> Twitter</a>
                                                </nav>
                                        </div>
                                </div>
                        </div>
                </footer>

                <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
                <!--<script src="http://localhost/scripts/vendor/jquery.min.js"></script>-->
                <script>window.jQuery || document.write('<script src="http://localhost/scripts/vendor/jquery.min.js"><\/script>')</script>

                <script src="http://localhost/bower_components/foundation/js/foundation.min.js"></script>
                <script src="http://localhost/bower_components/foundation/js/foundation/foundation.clearing.js"></script>
                <script src="http://localhost/scripts/app.min.js"></script>
                        </body>
</html>[email protected]:~/halls$
Activity icon

Replied to Adding Any Thing In App.php's Providers Crashes The Application

    2. when I run any php artisan commands I get the below output I don't know why:

</html>[email protected]:~/halls$ php artisan list
<!DOCTYPE html>
<!--[if lt IE 7]>          <html class="no-js ie lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>             <html class="no-js ie lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>             <html class="no-js ie lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js ie" lang="en"> <!--<![endif]-->
        <head>
                <meta charset="utf-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge">
                <title>Halls for Hire</title>
                <meta name="description" content="">
                <meta name="viewport" content="width=device-width, initial-scale=1">

                <link rel="shortcut icon" href="http://localhost/favicon.ico">
                <link rel="apple-touch-icon" href="http://localhost/apple-touch-icon.png">

                <link rel="stylesheet" href="http://localhost/styles/app.css">

                <script src="http://localhost/scripts/vendor/modernizr.min.js"></script>

                <script>
                        var _gaq = _gaq || [];
                                _gaq.push(['_setAccount', 'UA-32397342-1']);
                                _gaq.push(['_trackPageview']);

                        (function() {
                                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                        })();
                                        </script>

        </head>
        <body class="">
                <!--[if lt IE 7]>
                        <div class="alert-box error browsehappy" data-alert>You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience. <a href="#" class="close">&times;</a></div>
                <![endif]-->
                <header id="header">
                                        <h1 id="title"><a href="http://localhost" class="sprite logo-header">Halls For Hire</a></h1>
                        <div id="user" class="show-for-medium-up">
                                                <a href="http://localhost/login" class="login"><i class="fa fa-lock "></i> Log In</a>
                                <a href="http://localhost/register" class="button secondary radius"><i class="fa fa-bullhorn "></i> List Your Hall</a>
        </div>                          </header>

                <section id="main">


                        <div class="wrap center">
        <h3>Error occurred!</h3>
        <p>An unknown error has occurred.</p>
        <p><a href="http://localhost">Return Home</a></p>
</div>
                </section>

                <footer id="footer">
                        <div class="wrap">
                                <div class="row">
                                        <div class="medium-3 columns">
                                                <h6><i><strong>&copy;</strong></i> Halls for Hire</h6>
                                                <nav>
                                                        <a href="http://localhost/conditions"><i class="fa fa-list-alt "></i> Terms &amp; Conditions</a>
                                                        <a href="http://localhost/contact"><i class="fa fa-envelope-o "></i> Contact Halls for Hire</a>
                                                </nav>
                                        </div>
                                        <div class="medium-3 columns">
                                                <h6><i class="fa fa-list "></i> Navigation</h6>
                                                <nav>
                                                        <a href="/"><i class="fa fa-search "></i> Search Halls</a>
                                                        <a href="http://localhost/halls"><i class="fa fa-list-alt "></i> Browse Halls</a>
                                                        <a href="http://localhost/about"><i class="fa fa-question-circle "></i> About</a>
                                                        <a href="http://localhost/pricing"><i class="fa fa-money "></i> Pricing</a>
                                                        <!-- <a href="http://localhost/community"><i class="fa fa-users "></i> Community</a> -->
                                                </nav>
                                        </div>
                                        <div class="medium-3 columns">
                                                <h6><i class="fa fa-user "></i> Members</h6>
                                                <nav>
                                                        <a href="http://localhost/login" class="login"><i class="fa fa-lock "></i> Log In</a>
                                                        <a href="http://localhost/register"><i class="fa fa-bullhorn "></i> List Your Hall</a>
                                                </nav>
                                        </div>
                                        <div class="medium-3 columns">
                                                <h6><i class="fa fa-thumbs-up "></i> Get Social</h6>
                                                <nav>
                                                        <a href="https://www.facebook.com/" target="_blank"><i class="fa fa-facebook "></i> Facebook</a>
                                                        <a href="https://twitter.com/" target="_blank"><i class="fa fa-twitter "></i> Twitter</a>
                                                </nav>
                                        </div>
                                </div>
                        </div>
                </footer>

                <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
                <!--<script src="http://localhost/scripts/vendor/jquery.min.js"></script>-->
                <script>window.jQuery || document.write('<script src="http://localhost/scripts/vendor/jquery.min.js"><\/script>')</script>

                <script src="http://localhost/bower_components/foundation/js/foundation.min.js"></script>
                <script src="http://localhost/bower_components/foundation/js/foundation/foundation.clearing.js"></script>
                <script src="http://localhost/scripts/app.min.js"></script>
                        </body>
</html>
[email protected]:~/halls$

I don't why it is giving this index.html page.

Activity icon

Replied to Adding Any Thing In App.php's Providers Crashes The Application

Thank you, composer require maatwebsite/excel "~1.3" worked.

I also have other issue of php artisan commands not working.

[email protected]:~/hallsforhire$ composer require maatwebsite/excel "~1.3"
    1/3:        http://repo.packagist.org/p/provider-lateste45e94fad17da0483c4253910219bd1eec3442064cc3525d2a24a5797f42bc2.json
    2/3:        http://repo.packagist.org/p/provider-2019-07$ba14a64bbda0d6be52cdef483992230c233975d43a387abafb1e416b61ec7016.json
    3/3:        http://repo.packagist.org/p/provider-2019-04e14a0d40d60142520d86ccac7531052c958660397c5ad607aeb194a240ad4b6.json
    Finished: success: 3, skipped: 0, failure: 0, total: 3
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
    1/4:        https://codeload.github.com/doctrine/lexer/legacy.zip/1febd6c3ef84253d7c815bed85fc622ad207a9f8
    2/4:        https://codeload.github.com/tijsverkoyen/CssToInlineStyles/legacy.zip/9753fc340726e327e4d48b7c0604f85475ae0bc3
    3/4:        https://codeload.github.com/Maatwebsite/Laravel-Excel/legacy.zip/38a922afe0714dcddde926ba23dfd0f5678cb18a
    4/4:        https://codeload.github.com/PHPOffice/PHPExcel/legacy.zip/39534e3dd376041d0d50a4714e73375bf45b692b
    Finished: success: 4, skipped: 0, failure: 0, total: 4
Package operations: 4 installs, 0 updates, 0 removals
  - Installing tijsverkoyen/css-to-inline-styles (1.5.5): Loading from cache
  - Installing doctrine/lexer (1.0.x-dev 1febd6c): Cloning 1febd6c3ef from cache
  - Installing phpoffice/phpexcel (1.8.x-dev 39534e3): Cloning 39534e3dd3 from cache
Cloning 39534e3dd3 from cache
  - Installing maatwebsite/excel (1.3.10): Loading from cache
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Writing lock file
Generating autoload files
> php artisan clear-compiled
> php artisan optimize
Laravel requires the Mcrypt PHP extension.
Laravel requires the Mcrypt PHP extension.
Activity icon

Started a new conversation Adding Any Thing In App.php's Providers Crashes The Application

I have been trying to export data to excel so for this purpose I added

'Maatwebsite\Excel\ExcelServiceProvider' in providers
'aliases'=>array(
'Excel'           => 'Maatwebsite\Excel\Facades\Excel'
)

I have also added "maatwebsite/excel": "~1.3" in composer.json, because my laravel version "laravel/framework": "4.0.*", so 
"require": {
        "laravel/framework": "4.0.*",
        "way/generators": "2.6.*",
        "cartalyst/sentry": "2.0.*",
        "willdurand/geocoder": "2.4.*",
        "toin0u/geocoder-laravel": "0.4.1",
        "kriswallsmith/buzz": "@stable",
        "egeloen/google-map": "1.3.*@dev",
        "intervention/image": "1.*",
        "intervention/imagecache": "1.*",
        "greggilbert/recaptcha": "1.1.5",
        "patchwork/utf8": "~1.1",
        "maatwebsite/excel": "~1.3"
    },```
is my composer.json require section.

and when I add it in app.php providers and aliases, my application crashes. I am using homestead.
NOTE: I can't add anything in providers.
Activity icon

Replied to How To Use Https://www.appointedd.com/developers

Embedding appointedd

  1. Login and create booking apps under Booking tools>Booking apps
  2. When you complete creating booking apps, youcan see two tabs Embed mode and Popover mode, select any of them.
  3. You can also see </> Embed and Save app button click Save app first and click Embed second. NOTE: Always Save app after changing mode.
  4. You will be provided iframe or html script depending on the mode you select.
  5. Copy the HTML and paste it where you want to display appointedd.
  6. For further details, you can also contact appointedd support team. very supportive.
Activity icon

Replied to 'appointedd_appid' => 'required_if: Isbooking_enabled,1' Does Not Gives Validation Error Message

Thank you so much @bobbybouwmann, I could now customize any message in validation.php.

Aug
19
2 months ago
Activity icon

Replied to 'appointedd_appid' => 'required_if: Isbooking_enabled,1' Does Not Gives Validation Error Message

This approach did not work for me so I did 'appointedd_appid' => 'sometimes|required_if:isbooking_enabled,1' , and got this validation message The appointedd appid field is required when isbooking enabled is 1. which is not user-friendly I guess. How this message can be customized?

Activity icon

Started a new conversation Error While Installing Homestead

There was an error while executing VBoxManage, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "e8c8cf45-292c-486b-a0ff-f5fede3922fc", "--type", "headless"]

Stderr: VBoxManage.exe: error: Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2' (VERR_INTNET_FLT_IF_NOT_FOUND). VBoxManage.exe: error: Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

I have been trying to install homestead but I am failing to do with this error, however, I have previously installed in my machine, I have uninstalled VirtualBox and Vagrant but now I cannot install. Please help me fix the aforementioned error.

Activity icon

Started a new conversation 'appointedd_appid' => 'required_if: Isbooking_enabled,1' Does Not Gives Validation Error Message

'appointedd_appid' => 'required' gives validation message but when I add 'appointedd_appid' => 'required_if: isbooking_enabled,1' so that I can error message only when the checkbox is checked, I don't know why it is not working. Please help me.

Activity icon

Replied to Page Does Not Load When I Add Field Name In Form:checkbox

Thank you so much.

 if($("input[name=isbooking_enabled]").prop('checked') == true){
            $('#appointed').show();
        }else {
            $('#appointed').hide();
        }
        var checkbox = document.querySelector("input[name=isbooking_enabled]");
        checkbox.addEventListener('change', function () {
            if (this.checked) {
                $('#appointed').show();
            } else {
                $('#appointed').hide();
            }
        });

I added the above code to check if the checkbox is empty or not also added event listener for check change and it worked accordingly.

Activity icon

Replied to Page Does Not Load When I Add Field Name In Form:checkbox

Thank you @bobbybouwmann I did

    @include( 'admin.partials.form_row', array( 'name'=>"isbooking_enabled", 'label'=>"Enable Booking", 'input' => Form::checkbox('isbooking_enabled', true,count($data)>0?$data->isbooking_enabled: $data) ) )

and it fix the issue, however I have another issue

$('document').ready(function () {        
<script>
        $('#appointed').hide();

        var checkbox = document.querySelector("input[name=isbooking_enabled]");

        checkbox.addEventListener('change', function () {
            if (this.checked) {
                $('#appointed').show();

            } else {
                $('#appointed').hide();
            }
        });
    });
</script>

@if($current_user->hasAccess('Admin'))
    <hr/>
    @include( 'admin.partials.form_row', array( 'name'=>"isbooking_enabled", 'label'=>"Enable Booking", 'input' => Form::checkbox('isbooking_enabled', true,count($data)>0?$data->isbooking_enabled: $data) ) )
    <div id="appointed">
        @include( 'admin.partials.form_row', array( 'name'=>"appointedd_appid", 'label'=>"Appointedd AppId" ) )
    </div>
@endif

I have used jquery to make appointed div visible and invisible, whick works fine when I check and uncheck checkbox (i.e in create page where there is no data in $data) but while editing the page I want the apponted to be visible, because there will be data in $data->isbooking_enabled. In this case appointed div is not visible. What could be the better way to make it work for both create and edit.

Activity icon

Started a new conversation Page Does Not Load When I Add Field Name In Form:checkbox

In my create.blade.php, If I add $data then I the page is loaded but when I add $data->isbooking_enabled then the page doesn't loads.

@include( 'admin.partials.form_row', array( 'name'=>"isbooking_enabled", 'label'=>"Enable Booking", 'input' => Form::checkbox('isbooking_enabled', true, $data) ) )
    @include( 'admin.partials.form_row', array( 'name'=>"isbooking_enabled", 'label'=>"Enable Booking", 'input' => Form::checkbox('isbooking_enabled', true, $data->isbooking_enabled) ) )

but the 2nd one works in edit.blade.php.

what could be the reason for the page not working in create but works in edit?

Activity icon

Replied to Checkbox Not Working

Thank you, It worked

Aug
16
2 months ago
Activity icon

Replied to Checkbox Not Working

Thank you, It worked for me to hide the textbox but I also have to hide 'label'

 @include( 'admin.partials.form_row', array( 'name'=>"appointedd_appid", 'label'=>"Appointedd AppId" ) )

How can I get id/name in this case like I did $('input[name=appointedd_appid]').hide(); to hide the textbox.

Activity icon

Replied to Checkbox Not Working

##details.blade.php
<h3>Hall Details</h3>

@include( 'admin.partials.form_row', array( 'name'=>"name", 'label'=>"Hall Name" ) )
@include( 'admin.partials.form_row', array( 'name'=>"capacity", 'label'=>"Capacity" ) )
@include( 'admin.partials.form_row', array( 'name'=>"email", 'label'=>"Email" ) )
@include( 'admin.partials.form_row', array( 'name'=>"website", 'label'=>"Website" ) )

<div class="row">
    <div class="small-3 columns {{ $errors->has('phone') ? 'error' : '' }}">
        <label for="phone" class="right">Phone</label>
    </div>
    <div class="small-1 columns">
        {{ Form::select('phone_area', Lang::get('geography.area_codes'), (isset($data->phone->area) && $data->phone->area ? $data->phone->area : "")) }}
    </div>
    <div class="small-8 columns {{ $errors->has('phone') ? 'error' : '' }}">
        {{ Form::text('phone', (isset($data->phone->body) && $data->phone->body ? $data->phone->body : ""), array('id'=>'phone')) }}
        {{ $errors->first('phone', '<small>:message</small>') }}
    </div>
</div>

<div class="row">
    <div class="small-3 columns {{ $errors->has('fax') ? 'error' : '' }}">
        <label for="fax" class="right">Fax</label>
    </div>
    <div class="small-1 columns">
        {{ Form::select('fax_area', Lang::get('geography.area_codes'), (isset($data->fax->area) && $data->fax->area ? $data->fax->area : "")) }}
    </div>
    <div class="small-8 columns {{ $errors->has('fax') ? 'error' : '' }}">
        {{ Form::text('fax', (isset($data->fax->body) && $data->fax->body ? $data->fax->body : ""), array('id'=>'fax')) }}
        {{ $errors->first('fax', '<small>:message</small>') }}
    </div>
</div>

<hr/>
@include( 'admin.partials.form_row', array( 'name'=>"location", 'label'=>"Address" ) )
@include( 'admin.partials.form_row', array( 'name'=>"street_number", 'label'=>"Street Number" ) )
@include( 'admin.partials.form_row', array( 'name'=>"route", 'label'=>"Street" ) )
@include( 'admin.partials.form_row', array( 'name'=>"locality", 'label'=>"City" ) )
@include( 'admin.partials.form_row', array( 'name'=>"state", 'label'=>"State", 'input' => Form::select('state', Lang::get('geography.states'), object_get($data, 'state') ) ) )
@include( 'admin.partials.form_row', array( 'name'=>"postcode", 'label'=>"Postcode" ) )
{{ Form::hidden('latitude', object_get($data, 'latitude')) }}
{{ Form::hidden('longitude', object_get($data, 'longitude')) }}

<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&key=AIzaSyAvO7MxTw05aBK7YJzhPvHg3SVfqBJW-Bs"></script>

{{--<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&key=AIzaSyBD6gUIw3u6iNBQOkGMv6_EYYKBae5Fn88"></script>--}}
<script>
    var placeSearch, map, autocomplete;

    function setPlace(place) {
        var latitude = place.geometry.location.lat(),
            longitude = place.geometry.location.lng();

        $('input[name=latitude]').val(latitude);
        $('input[name=longitude]').val(longitude);

        console.log(place);

        $.each(place.address_components, function (index, value) {
            if ($.inArray("street_number", value.types) >= 0) $('input[name=street_number]').val(value.long_name);
            if ($.inArray("route", value.types) >= 0) $('input[name=route]').val(value.long_name);
            if ($.inArray("locality", value.types) >= 0) $('input[name=locality]').val(value.long_name);
            if ($.inArray("administrative_area_level_1", value.types) >= 0) $('select[name=state]').val(value.short_name);
            if ($.inArray("postal_code", value.types) >= 0) $('input[name=postcode]').val(value.long_name);
        });
    }

    $('document').ready(function () {
        if ($('input[name=location]').length) {
            var bounds = new google.maps.LatLngBounds(
                new google.maps.LatLng(-47.5765257137462, 106.259765625),
                new google.maps.LatLng(-9.6, 179.359375)
            );

            var options = {
                bounds: bounds,
                types: ['geocode'],
                offset: 5,
                componentRestrictions: {country: 'AU'}
            };

            var autocomplete = new google.maps.places.Autocomplete(document.getElementById('location'), options);
            var geocoder = new google.maps.Geocoder();

            google.maps.event.addListener(autocomplete, 'place_changed', function () {
                var place = autocomplete.getPlace();
                setPlace(place);
            });

            $('input[name=location]').blur(function () {
                if (!$('input[name=location]').val()) {
                    var firstResult = $(".pac-container .pac-item:first").text();

                    setTimeout(function () {
                        $('input[name=location]').val(firstResult)
                    }, 50);
                    $(this).val(firstResult);
                    geocoder.geocode({"address": firstResult}, function (results, status) {
                        if (status === google.maps.GeocoderStatus.OK) {
                            setPlace(results[0]);
                        }
                    });
                    return false;
                }
            });

            $("input[name=location]").focusin(function () {
                $(document).keypress(function (e) {
                    if (e.which === 13) {
                        $("input[name=location]").blur();
                        return false;
                    }
                });
            });
        }

        geocoder = new google.maps.Geocoder();
        $('button.submit').click(function (e) {
            e.preventDefault();
            var address = $('input[name=street_number]').val() + " " +
                $('input[name=route]').val() + ", " +
                $('input[name=locality]').val() + ", " +
                $('input[name=state]').val() + " " +
                $('input[name=postcode]').val() + ", Australia";
            geocoder.geocode({'address': address}, function (results, status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    $('input[name=latitude]').val(results[0].geometry.location.lat());
                    $('input[name=longitude]').val(results[0].geometry.location.lng());
                }
                $('form').trigger('submit');
            });
        });


        $('isbooking_enabled').change(function () {
            alert('checked');
            if (this.checked)
                $('appointedd_appid').fadeIn('slow');
            else
                $('appointedd_appid').fadeOut('slow');

        });


    });
</script>

@if($current_user->hasAccess('Admin'))
    <hr/>
    @include( 'admin.partials.form_row', array( 'name'=>"featured", 'label'=>"Featured", 'input' => Form::checkbox('featured', true, $data) ) )
    @include( 'admin.partials.form_row', array( 'name'=>"isbooking_enabled", 'label'=>"Enable Booking", 'input' => Form::checkbox('isbooking_enabled', true, $data) ) )
    @include( 'admin.partials.form_row', array( 'name'=>"appointedd_appid", 'label'=>"Appointedd AppId" ) )
@endif



##form_row.blade.php  


<div class="row">
    <div class="small-3 columns {{ $errors->has($name) ? 'error' : '' }}">
        <label for="{{ $name }}" class="right">{{ $label }}</label>
    </div>
    <div class="small-9 columns {{ $errors->has($name) ? 'error' : '' }}">
        @if(isset($input) && $input)
            {{ $input }}
        @else
            {{ Form::text($name, (isset($data->{$name}) && $data->{$name} ? $data->{$name} : ""), array('id'=>$name)) }}
        @endif
        {{ $errors->first($name, '<small>:message</small>') }}
    </div>
</div>

Activity icon

Started a new conversation Checkbox Not Working

<script>
   $('document').ready(function() {
    $('#isbooking_enabled').click(function (e) {
        alert("checked");
        // this.checked?$('#appointedd_appid').show(1000):$('#appointedd_appid').hide(1000);
    });
    });
</script>

@include( 'admin.partials.form_row', array( 'name'=>"isbooking_enabled", 'label'=>"Enable Booking", 'input' => Form::checkbox('isbooking_enabled', true, $data) ) )
@include( 'admin.partials.form_row', array( 'name'=>"appointedd_appid", 'label'=>"Appointedd AppId" ) )

I have "isbooking_enabled" checkbox which I have to make visible only when checkbox is checked. Can you please review the code and suggest what I am doing wrong>

Aug
14
2 months ago
Activity icon

Started a new conversation Composer Trying To Install Appointedd/appointedd-php

C:\projects\bookingsystem\live>composer require appointedd/appointedd-php
Using version dev-master for appointedd/appointedd-php
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for appointedd/appointedd-php dev-master -> satisfiable by appointedd/appointedd-php[dev-master].
    - Conclusion: remove laravel/framework 4.0.x-dev
    - Conclusion: don't install laravel/framework 4.0.x-dev
    - appointedd/appointedd-php dev-master requires illuminate/support >=4.1.0,<4.3 -> satisfiable by illuminate/support[4.1.x-dev, 4.2.x-dev, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4
.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.29, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9,
v4.2.0-BETA1, v4.2.1, v4.2.12, v4.2.16, v4.2.17, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
    - don't install illuminate/support 4.1.x-dev|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support 4.2.x-dev|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.0|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.1|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.10|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.11|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.12|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.13|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.14|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.15|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.16|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.17|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.18|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.19|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.2|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.20|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.21|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.22|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.23|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.24|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.25|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.26|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.27|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.28|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.29|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.3|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.30|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.4|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.5|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.6|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.7|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.8|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.1.9|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.0-BETA1|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.1|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.12|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.16|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.17|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.2|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.3|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.4|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.5|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.6|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.7|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.8|don't install laravel/framework 4.0.x-dev
    - don't install illuminate/support v4.2.9|don't install laravel/framework 4.0.x-dev
    - Installation request for laravel/framework (locked at 4.0.x-dev, required as 4.0.*) -> satisfiable by laravel/framework[4.0.x-dev].


Installation failed, reverting ./composer.json to its original content.

I got the aforementioned issues while trying to install appointedd/appointedd-php. I am using Laravel 4.

Activity icon

Replied to How To Use Php Artisan In Vagrant/Homestead

I got Laravel requires the Mcrypt PHP extension error. The project is in laravel 4 which I am not able to run in my local machine, but I could do it in the homestead.

Activity icon

Started a new conversation How To Use Php Artisan In Vagrant/Homestead

I am using Homestead and I want php artisan command to execute but I don't know how to make it work in homestead/vagrant. In my case php artisan commands doesnot work in local server. Actually the project that I have doesnot compiles in local server, but using Homestead I can execute the project. Now I have to create model but I cannot create it because of php artisan command not working in local and Homestead envirenment. Can anyone please help me to understand and resolve it.

Aug
13
2 months ago
Activity icon

Replied to Event Calendar For Laravel 4.0

I am in confusion whether my approach is correct or incorrect, but I am not understanding https://fullcalendar.io/docs/getting-started, specific to laravel 4, because I have followed the following steps from https://packagist.org/packages/maddhatter/laravel-fullcalendar

  1. Added on composer.json
"require": {
    "maddhatter/laravel-fullcalendar": "~1.0"
}
  1. In app.php
'providers' => array(
      'MaddHatter\LaravelFullcalendar\ServiceProvider::class',
)

'aliases' => array(
        'Calendar'  => 'MaddHatter\LaravelFullcalendar\Facades\Calendar::class',
)

but I got Whoops, looks like something went wrong. without any errors in the console.

Please help me find the correct way.

Activity icon

Replied to Event Calendar For Laravel 4.0

I am new to PHP and using homestead. The project that I have does not contain package.json file. However, I was trying the install npm and then I got the above error and when I type npm install command it creates package-lock.json file which contains

 "lockfileVersion": 1
}
Activity icon

Replied to Event Calendar For Laravel 4.0

C:\projects\hallsforhire\live>npm install npm WARN saveError ENOENT: no such file or directory, open 'C:\projects\library\live\package.jso n' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open 'C:\projects\library\live\package.json' npm WARN live No description npm WARN live No repository field. npm WARN live No README data npm WARN live No license field.

up to date in 1.133s found 0 vulnerabilities 

I am getting this error while trying to install npm. Why can't I install npm in laravel 4.0 project, but for laravel 5.8 I can do it without any issues. What could be the reason for this?

Activity icon

Replied to Event Calendar For Laravel 4.0

'''C:\projects\hallsforhire\live>npm install npm WARN saveError ENOENT: no such file or directory, open 'C:\projects\library\live\package.jso n' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open 'C:\projects\library\live\package.json' npm WARN live No description npm WARN live No repository field. npm WARN live No README data npm WARN live No license field.

up to date in 1.133s found 0 vulnerabilities '''

I am getting this error while trying to install npm. Why can't I install npm in laravel 4.0 project, but for laravel 5.8 I can do it without any issues. What could be the reason for this?

Activity icon

Started a new conversation Event Calendar For Laravel 4.0

I have to implement an event calendar in laravel 4.0 project, I looked into laravel/full calendar, which only supports (version>=4.2). I am looking for the calendar to implement in the event calendar in laravel 4 project, what could be the correct calendar for this laravel 4.0. Or can I integrate the third party calendar for this purpose? What could be the best third party event calendar which is easy to integrate to laravel 4.0 project?

Aug
11
2 months ago
Activity icon

Replied to What Are The Steps We Follow After Downloading The Project From Git?

  1. Create a Homestead
  2. Homestead.yaml should look like this
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

# keys:
#     - ~/.ssh/id_rsa

folders:
    - map: C:\projects\myproject\firstproject
      to: /home/vagrant/myproject

sites:
    - map: myproject.test
      to: /home/vagrant/myproject/public
      php: "5.6"

databases:
    - myproject_db

features:
    - mariadb: false
    - ohmyzsh: false
    - webdriver: false

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp
  1. sudo apt-get install mcrypt php5.6-mcrypt -- You might suggestion for updating you can just type the suggested command and anaging run sudo apt-get install mcrypt php5.6-mcrypt

  2. add "patchwork/utf8": "~1.1" in composer.json and run 'composer update patchwork/utf8' - if you get Deprecated: ini_set() issue.

and then it works.