Skip to content

Site working fine but slimframework return 404 not found #1219

Answered by marcboule98
marcboule98 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, now is working, i create a Custom Slim Driver. Here it is if anyone got the same error:

<?php

class SampleValetDriver extends ValetDriver
{
    /**
     * Determine if the driver serves the request.
     *
     * @param  string  $sitePath
     * @param  string  $siteName
     * @param  string  $uri
     * @return bool
     */
    public function serves($sitePath, $siteName, $uri)
    {
	if (strpos($uri, 'api.php') !== false) {
		return true;
	}

        return false;
    }

    /**
     * Determine if the incoming request is for a static file.
     *
     * @param  string  $sitePath
     * @param  string  $siteName
     * @param  string  $uri
     * @return string|false
     */
    p…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marcboule98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant