mattysmart

mattysmart

Member Since 4 Years Ago

Experience Points 3,910
Experience Level 1

1,090 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 55
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 Jul
2 years ago

mattysmart started a new conversation Running Wordpress Website And Laravel Under The Same Domain

I have an amazon EC2 instance with a Laravel application running on Ubuntu and nginx.

This is the route to my laravel app

/home/forge/default/

Now I want to add a wordpress blog to my existing laravel application, however it needs to be under the same domain name for SEO reasons. That means subdomains are out of the question.

SO i have created a folder on my EC2 instance

/home/forge/blog/wordpress/

In here I have cloned my WordPress repository.

I was told that if i can point nginx to this folder when /blog is accessed it would go to the wordpress site. I was told that if I edit vim /etc/nginx/sites-available/default and put - location /blog { root /home/forge/blog/wordpress/; } I would do the trick.

However after doing this it just makes my whole website un-accessible.

Can anyone give me some advise as to how I can acheive this please, and if you require any further information just leave a comment and I will reply.

this is my nginx config:

include forge-conf/default/before/*;

server{
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name default;
    root /home/forge/default/public;

    # FORGE SSL (DO NOT REMOVE!)
    # ssl_certificate;
    # ssl_certificate_key;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/dhparams.pem;

    index index.html index.htm index.php;

    charset utf-8;

    # FORGE CONFIG (DOT NOT REMOVE!)
    include forge-conf/default/server/*;

     location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log  /var/log/nginx/default-error.log error;

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
    }
location ~ /\.ht {
        deny all;
    }
}

# FORGE CONFIG (DOT NOT REMOVE!)
include forge-conf/default/after/*;

Thanks

06 Jul
3 years ago

mattysmart started a new conversation Forge & Amazon AWS

Hello

I purchased Laravels forge and created a digital ocean droplet. However after a month or so I have decided to move away from DO and go to Amazon AWS.However, i'm running into problems trying to get forge working with Amazon AWS.

When I go to My Account > Server Providers > Amazon and put in my Key and Secret, the error I get is:

"Whoops! There were some problems with your input. Invalid API credentials."

However, I just created a new IAM user in amazon console so I know they key and secret are correct.

Any ideas?

04 Jun
3 years ago

mattysmart started a new conversation Amazon S3 - Storage::get('high.mp4') Timing Out

I am trying to get an mp4 file and download it for user.

If i so the following:

 echo Storage::size('high.mp4');

I get "56352847". And if i do this:

echo Storage::exists('high.mp4');

I get "1"

Likewise if i do:

echo Storage::exists('test.mp4'); or echo Storage::size('test.mp4');

Nothing displays, which tells me that it is successfully seeing my file on my amazon bucket named "high.mp4". So when i try to get my file doing this:

echo Storage::get('high.mp4');

The page simply times out. I ave updated my php.ini to allow the memory usage for the file size but no difference. Any ideas?

mattysmart left a reply on How To Download File From Amazon S3 Bucket - L5.2

@ejdelmonico , i have tried this and i still get the same error.

mattysmart started a new conversation How To Download File From Amazon S3 Bucket - L5.2

Hello

How do I download a video file form my amazon s3 bucket?

I have followed the docs but cannot figure it out. I have set up my amazon details in laravel, and when tyring to dwonload the file i get the following error:

FileNotFoundException in File.php line 37:
The file "https://s3.ireland.amazonaws.com/my-bucket-name/Shoots/2016/06/first%20video%20shoot/videos/high.mp4" does not exist

public function s3Test()
{
    $url = Storage::url('Shoots/2016/06/first video shoot/videos/high.mp4');
    return response()->download($url);
}

The $url looks like this: https://s3.ireland.amazonaws.com/my-bucket-name/Shoots/2016/06/first%20video%20shoot/videos/high.mp4

28 May
3 years ago

mattysmart left a reply on Update Stripe Card Details For Subscribed User

@Francismori7 What would the form look like? Similar to the checkout one?

mattysmart started a new conversation Update Stripe Card Details For Subscribed User

I have allows users to subscribe to my application. But if the users card details change they will need to update them both on stripes end and on my database too.

How can i do this in Laravel, i have seen people using a updateCard() method on stack overflow questions but i cannot find the method on documentation.

Can anyone point me in the right direction please?

20 May
3 years ago

mattysmart started a new conversation Cannot Install Bitbucket Repository On Forge

I have recently purchased Forge and have attempted to create my first droplet. I honestly have no experience with server management at all and so I though Forge would be useful.

I successfully created the droplet, however when I try to Install Repository I get the following error:

We were unable to install a project on your server (my droplet name)

Something went wrong when we tried to execute an action on your server. Sometimes this means we couldn't SSH into the server, or something may have gone wrong while executing a command. If error output is available, please review it below.

Error Output

Cloning into 'default'... Warning: Permanently added the RSA host key for IP address '104.192.143.3' to the list of known hosts. /home/forge/.forge/provision-5010270.sh: line 29: composer: command not found

Couldn't Clone Repository?

Please make sure the following SSH key has been added as a "deploy key" to your source control provider account:

I have gone into my bitbucket account and tried to input the ssh key in the "deployment key" section but it says - Someone has already registered this as an account SSH key.

I really have no idea what to do. Can someone please advise me?

Thanks

24 Nov
3 years ago

mattysmart left a reply on I Cannot Install Either Laravel Or Lumen!

OK, well i have my homestead running, "vagrant up" And it says in my git bash "VirtualBox VM is already running".

this is what my homestead.yaml looks like:

 ip: "192.168.10.10"
 memory: 2048
 cpus: 1
 provider: virtualbox

 authorize: ~/.ssh/id_rsa.pub

 keys:
- ~/.ssh/id_rsa

 folders:
- map: ~/HomesteadSites
  to: /home/vagrant/Code

 sites:
- map: homestead.app
  to: /home/vagrant/Code/Laravel/public

 databases:
- homestead

 variables:
- key: 'APP_ENV'
  value: 'local'
- key: 'APP_DEBUG'
  value: 'true'

so how do i install laravel through the actual vm? Because at the minute im under the understanding that you place your files in the directory and it runs them like MAMP.

mattysmart left a reply on I Cannot Install Either Laravel Or Lumen!

is there anyway you could spare 5 minutes on a private chat ? I could really do with a quick talk to get this sorted , if yes im on laravel.io/chat named mattsmart

mattysmart left a reply on I Cannot Install Either Laravel Or Lumen!

I have completed the videos yes. I have made many apps with laravel , i think its just using a windows machine thats throwing me.

I have got homestead installed on my machine to try and resolve this issue. But that doesnt change how i install laravel or lumen does it? Still has to come through composer

mattysmart left a reply on I Cannot Install Either Laravel Or Lumen!

I have installed homestead, but i have no idea how to use it

mattysmart started a new conversation I Cannot Install Either Laravel Or Lumen!

This is extremely frustrating. I have been trying to install a simple laravel/lumen project now for like 3 days with no success. I am used to a mac environment and in previous job had no issues. However at my new job i am having to use a Windows PC , running windows 8 and using MAMP Pro.

So like normal, i go to install Laravel using

  composer create-project laravel/laravel --prefer-dist

Now it pulls in the files, usual structure of app,bootstrap,config,database,public etc ....

However after its done and it tries to pull through dependencies i receive a very annoying error

  /c/ProgramData/ComposerSetup/bin/composer: line 18:  7136 Segmentation fault      php "${dir}/composer.phar" $*

I cannot get this working, everything i try is failing. Its something that should be so simple but now means im running behind 3 days on my work project. Can any one advise?

15 Nov
3 years ago

mattysmart started a new conversation Is This Concept Ok For A Multiple Websites With Shopping Carts

Hello guys, this isn't a problem with code kind of question, more a question on concept.

I have recently moved from a junior developer role to being a single developer for a new company. This company has around 20 websites that i need to rebuild and bring to the 21st century.

Around 8 of these websites will need to sell products using a shopping cart. The owner wants 1 single database to hold all of the products for each website. So this is what i plan to do, and hope you guys can tell me if its a bad idea (if so how would you do it).

The websites will all be WordPress sites by the way.... PLAN:

  1. So firstly i will create a database server and plan the structure of the tables & relationships etc..

  2. I will be creating an API using Laravels lumen. This will serve as the middle man to communicate to the websites and the database.

  3. I will create a management tool for inputting products into the database (Usual CRUD application), and also do things like sowing statistics of best sellers etc...

  4. I will create a plugin that will be used for all of these websites. This will be for the shopping cart. This plugin will call and fetch from the api and then to the database.

  5. Create the websites and install the plugin.

The reason i have thought of this structure is to reduce using the same code over and over for every single websites. I will have a base website with the plugin that i can test things on, and any updates can be tested and rolled out to all of the websites. Essentially the only way the plugin with differ for each website will be the CompanyID.

This will be my first major kind of system built all by myself and is one of the reasons why i kind of chose this structure as it will test me and teach me a lot of different techniques. SO thats building an API using lumen. Building a web application using Laravel framework. Building a good WordPress plugin, along with building good WordPress themes.

So guys , here is the time for you to say that its a stupid idea and kill my dream system :( aha. But seriously is this a good concept to go on or should i totally re-think this?

Many Thanks

Matt

06 Oct
3 years ago

mattysmart left a reply on Overriding Current Website

I get you now :).

I thought i would have to back it up, then delete , then create the production branch to the empty server and start version control from there aha

05 Oct
3 years ago

mattysmart left a reply on Overriding Current Website

@martinbean So do you mean i set up the production branch to the server. and when i push it will automatically delete the old site and replace with my repository?

mattysmart left a reply on Overriding Current Website

But I'm building a completely new website to go on that domain.

mattysmart left a reply on Overriding Current Website

Hi @martinbean , i understand the whole beanstalk git version control methods. I just wanted to make sure that my concept was on the right direction?

mattysmart started a new conversation Overriding Current Website

Hi guys, I'm a junior dev and starting a new role next week as the companies first developer.

I am expected to rebuild all their websites from scratch. I'm posting here to see if I will be taking the correct approach.

So I'm thinking about;

  1. Making a local version of the new site.
  2. Then when local site is correct I will make a subdomain of the existing site and use it for a dev site to push my local changes up to. This means I am using an exact replication of the server confid.
  3. Once step 2 is done and I'm happy that every thing is fine I will take a back up of the existing site and override it with the subdomain files.

After this I will be using version control to push to dev site (subdomain) testing then push to live.

Is this the correct/appropriate approach?

07 Sep
3 years ago

mattysmart started a new conversation CSV Export In Controller

Hello

So i have made a little ajax request to my reviewsController@export.

Now when i console.log() the data in my success method, the ajax response shows the correct data. However my CSV has not downloaded. So i have all the right info and have creates the csv essentially.

I think this is possibly to do with setting the headers maybe?

public function export()
{
    header("Content-type: text/csv");
    header("Content-Disposition: attachment; filename=file.csv");
    header("Pragma: no-cache");
    header("Expires: 0");

    $reviews = Reviews::getReviewExport($this->hw->healthwatchID)->get();
    $columns = array('ReviewID', 'Provider', 'Title', 'Review', 'Location', 'Created', 'Anonymous', 'Escalate', 'Rating', 'Name');

    $file = fopen('php://output', 'w');
    fputcsv($file, $columns);

    foreach($reviews as $review) {
        fputcsv($file, array($review->reviewID,$review->provider,$review->title,$review->review,$review->location,$review->review_created,$review->anon,$review->escalate,$review->rating,$review->name));
    }
    exit();
}

Is there anything i am doing wrong here, or does Laravel have something to cater for this?

LARAVEL 5 by the way

06 Sep
3 years ago

mattysmart started a new conversation How To Retrieve Ajax Data In Controller

Hello all.

I have an ajax request as seen below:

    $.ajaxSetup({
        headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
    });
    jQuery.ajax({
        url:'/group/create',
        type: 'GET',
        data: {
            name: groupName,
            colour: "red"
        },
        success: function( data ){

            console.log(data);
        },
        error: function (xhr, b, c) {
            console.log("xhr=" + xhr + " b=" + b + " c=" + c);
        }
    });

This is my route:

Route::get('/group/create', ['middleware' => 'auth', 'uses' => 'GroupController@create']);

This is my controller:

public function create() { $name = $_GET['name']; $colour = $_GET['colour']; $input = [$name,$colour];

    return array('input' => $input);
}

How would i do this in a laravel way in my controller?

mattysmart left a reply on Ajax Request Creating Error

Hi all, sorry it was something on another page. I have two group.blade.php files :( lol

mattysmart left a reply on Ajax Request Creating Error

@meeshka this is in group.blade.php :

<div class="container" id="Group-container">
<div class="row">
    <div id="myCarousel" class="carousel slide" data-interval="false" data-ride="carousel">
        <button class="btn add-group">Add Group</button>
        <!-- Wrapper for slides -->
        <div class="carousel-inner" role="listbox">
            @if(count($groups) > 0)
                <?php
                    $count = 1;
                    $groupCount = count($groups);
                ?>
                <div class="item active">
                @foreach($groups as $group)
                        @if($count % 3 == 1)
                            <div class="row block first-block">
                        @else
                            <div class="row block">
                        @endif
                                <a href="/group/{{ $group->id }}">
                                    <div class="col-lg-4 visible-lg">
                                        <i class="fa fa-puzzle-piece"></i>
                                    </div>
                                </a>
                                <div class="col-lg-8 col-xs-12">
                                    <h2>{{ $group->name }}</h2>
                                    <form class="group-input" data-group-id="{{ $count }}" onsubmit="doSomething($(this).data('group-id'));">
                                        <input type="text" id="name"/>
                                    </form>
                                </div>
                            </div>
                        @if($count == $groupCount)
                            @if($count % 6 != 0)
                                <?php
                                    $newCount = 6 - ($count % 6);
                                    $freshCount = 0;
                                ?>

                                @while($freshCount < $newCount)
                                    <?php
                                        $freshCount++;
                                        $count++;
                                    ?>
                                    @if($count % 3 == 1)
                                        <div class="row block first-block starter">
                                    @else
                                        <div class="row block starter">
                                    @endif
                                        <div class="col-lg-4 visible-lg">
                                            <i class="fa fa-puzzle-piece"></i>
                                        </div>
                                        <div class="col-lg-8 col-xs-12">
                                            <h2>Add Group</h2>
                                            <form class="group-input" data-group-id="{{ $count }}" onsubmit="doSomething($(this).data('group-id'));">
                                                <input type="text" id="name"/>
                                            </form>
                                        </div>
                                    </div>
                                @endwhile
                            @endif
                        @endif
                            @if($count % 6 == 0)

                                </div>

                                    @if($groupCount > $count)

                                        <div class="item">

                                    @endif

                            @endif


                    <?php $count++;?>

                @endforeach
            @endif

        </div><!-- end #myCarousel -->
        <ol class="carousel-indicators">
            <!--<li data-target="#myCarousel" data-slide-to="0" class="active">1</li>-->
        </ol>
        <!-- Left and right controls -->
        <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
</div>
$('.carousel-inner h2').click(function(){ $(this).next().show().prev().hide(); });
$('.carousel-inner input[type=text]').blur(function(){
    console.log('out');
});

function doSomething(id){
    event.preventDefault();
    $('.carousel-inner').find("[data-group-id='" + id + "']").prev().show().next().hide();

    $.ajaxSetup({
        headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
    });
    jQuery.ajax({
        url:'/group/create',
        type: 'GET',
        success: function( data ){

            console.log(data);
        },
        error: function (xhr, b, c) {
            console.log("xhr=" + xhr + " b=" + b + " c=" + c);
        }
    });

}

mattysmart started a new conversation Ajax Request Creating Error

So i have a simple ajax request, and it is throwing an error.

$.ajaxSetup({
        headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
    });
    jQuery.ajax({
        url:'/group/create',
        type: 'GET',
        success: function( data ){

            console.log(data);
        },
        error: function (xhr, b, c) {
            console.log("xhr=" + xhr + " b=" + b + " c=" + c);
        }
    });

In my route i have

Route::get('/group/create', ['middleware' => 'auth', 'uses' => 'GroupController@create']);

and in my controller i have:

public function create()
{
    return "hello";
}

Now when i inspect the response i get:

ErrorException in Collection.php line 947:

Undefined offset: 0 (View: /Users/matt/Documents/Dev/managementapp/resources/views/application/pages/group.blade.php)

Does anyone know what is happening? if you need more code please let me know and i will update my answer

05 Sep
3 years ago

mattysmart left a reply on Simple Authentication

No i havent changed anything in my AuthController which is strange

mattysmart started a new conversation Simple Authentication

Hello , i am having problems with trying to do a simple user authentication.

So i have registered as a user through my register form. This has worked and is in my database.

Now i want to lock down the route /dashboard to allow logged in users. If they are not logged in i want it to redirect to the route /

Route:

Route::get('/dashboard', ['middleware' => 'Auth', 'uses' => 'DashboardController@index']);

Middleware (laravel out the box)

<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Contracts\Auth\Guard;

class Authenticate
{
    protected $auth;

    public function __construct(Guard $auth)
    {
        $this->auth = $auth;
    }

     /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if ($this->auth->guest()) {
            if ($request->ajax()) {
                return response('Unauthorized.', 401);
            } else {
                return redirect()->guest('/');
            }
        }

        return $next($request);
    }
}

Now when i try to access the route /dashboard i get the following error:

call_user_func_array() expects parameter 1 to be a valid callback, class 'Illuminate\Support\Facades\Auth' does not have a method 'handle'

Any ideas?

04 Sep
3 years ago

mattysmart started a new conversation PhantomJs With PHP

Okay so i have phantomJs set up in my laravel project.

If i get it to generate a pdf of a static page it works just fine. However i want to generate a PDF of a page that has a lot of server side code that needs to be worked out and then renders the page.

So when i try to generate the pdf i get an error of undefined variable which tells me phantomJs is either skipping the server side code or just doing it too fast.

use HealthwatchInformatics\Http\Requests; use PDF; use View; class PdfController extends Controller { public function index() { $view = View::make('dashboard.index'); return PDF::createFromView($view, 'filename.pdf'); } }

Any idea how i can do this?

mattysmart left a reply on Phantomjs: Cannot Execute Binary File

I have tried this:

"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize",
        "php -r \"exec('chmod -R +x vendor/antking/phantom-pdf/bin');\""
    ],

and run a composer update and i still get the exact same message.

Im not sure if i was referencing the wrong place? as in vendor/antking/phantom-pdf there is a /bin and /src

mattysmart started a new conversation Phantomjs: Cannot Execute Binary File

Hello

I am trying to use PhantomJs in my laravel 5 project. I have downloaded via composer. I have added into my providers section and aliases section within config/app.php

Okay so i have now created my controller as seen below:

<?php namespace App\Http\Controllers;

use App\Http\Requests;
use PDF;
use View;

class PdfController extends Controller {

    public function index()
    {
        $view = View::make('auth.login');

        return PDF::createFromView($view, 'filename.pdf');
    }
}

I have also created my route for this method. However when i try this in my browser it throws the following error:

PhantomJS: sh: /Users/matts/sites/healthwatch-informatics-2/vendor/antking/phantom-pdf/src/../bin/phantomjs: cannot execute binary file

Has anyone come across this before?

Thanks

07 Aug
3 years ago

mattysmart left a reply on Ext-mcrypt * -> The Requested PHP Extension Mcrypt Is Missing

osx 10.9.5, i'm not sure what you mean by 'distro' though?

mattysmart left a reply on Ext-mcrypt * -> The Requested PHP Extension Mcrypt Is Missing

When i try this i get zsh: command not found: apt-get

mattysmart started a new conversation Ext-mcrypt * -> The Requested PHP Extension Mcrypt Is Missing

Ive pulled down changes from beanstalk. and now i get:

Class 'Spatie\LaravelAnalytics\LaravelAnalyticsServiceProvider' not found

So trying to do a composer update which fails. I cd into the root directory of the project then run composer update which throws this:

laravel/framework v5.0.31 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.

i do not know how to resolve this, and everything i try on posts do not work

14 Jul
4 years ago

mattysmart started a new conversation .htaccess + .htpasswd Causing 404

ErrorDocument 401 /401.html
AuthName "Restricted Area" 
AuthType Basic 
AuthGroupFile /dev/null 
Require valid-user
AuthUserFile "/home/qehborg/.htpasswds/.htpasswd“

this is causing Error 404 - Not Found.

when i delete this htaccess code it works, any ideas?
22 Jun
4 years ago

mattysmart left a reply on Ajax Not Working?

@absiddiqueLive i have just done that but has no difference.

mattysmart left a reply on Ajax Not Working?

Thanks, i have put the comma in, also i do have use Request in my controller, however now when i alert(data) in the success method it shows a lot of html from my page. like below:

html>

- AUTOCOMPLETE SEARCH FOR PROVIDERS --> var searches = new Array(); var NoResultsLabel = "No Results"; function goToService(id) { var url = "/dashboard/service/" + id; window.location.href = url; }
$(function() {

    $("#providersearch").autocomplete({
            source: function(request, response) {
                if (request.term in searches

mattysmart started a new conversation Ajax Not Working?

Okay, i just want to do a very simple ajax request to send an id to my controller, but nothing is happening.

When i click the link it should grab the data-id value and post it away.

{{ $review->review }}

Now this is my ajax request

$(document).ready(function(){ $('.modelLink').click(function(){ alert('hello'); $this = $(this); $reviewID = $this.attr('data-id'); alert($reviewID);

        $.ajaxSetup({
            headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
        });
        jQuery.ajax({
            url: '/flyout',
            type: 'post',
            data:{
                'reviewID':$reviewID
            }
            success:function(data){
                alert(data);
            },
            error: function (xhr, b, c) {
                console.log("xhr=" + xhr + " b=" + b + " c=" + c);
            }
        });
    });
});

Route: Route::post('flyout','DashboardController@flyout');

Controller public function flyout(){ if(Request::ajax()) { $data = Input::all(); print_r($data); die; } }

Literally nothing is happening. Since i put in my ajax function not even the first alerts will pop up.