Code Monkey home page Code Monkey logo

Comments (12)

lear2012 avatar lear2012 commented on June 2, 2024

Is it mainly for laravel5.0 below?

from apidocs.

f2m2rd avatar f2m2rd commented on June 2, 2024

Yes, f2m2/apidocs are compatible with all versions of larval from 4.2 - 5.2. It sounds like the vendor src files are missing from the composer installation?

Try uninstalling "f2m2/apidocs": "dev-master" from composer and then re-installing.

from apidocs.

lear2012 avatar lear2012 commented on June 2, 2024

yeah, i tried but with no luck. It continues giving me that error. The problem is
that the file did exist there, why it keep saying that the file not found, weird......

from apidocs.

f2m2rd avatar f2m2rd commented on June 2, 2024

You said:

i manually created this file but the error still there.

What is in the vendor/f2m2/apidocs/src/templates/docs/ directory?

from apidocs.

lear2012 avatar lear2012 commented on June 2, 2024

i didn't manually create this file when i reinstalled the apidocs. And in that directory it has only one file
named index.flade.php.

from apidocs.

f2m2rd avatar f2m2rd commented on June 2, 2024

Try running composer dumpautoload

from apidocs.

lear2012 avatar lear2012 commented on June 2, 2024

i ran composer dumpautoload and then php artisan apidocs:generate, still no luck, the same error.

Here is what i did while reinstalling:

  1. sudo composer remove f2m2/apidocs
  2. sudo composer update
  3. Add this line F2m2\Apidocs\ApidocsServiceProvider::class to providers in php file
  4. php artisan apidocs:generate
    then error occurred.

I'm not sure it would help, but we at lease have something to follow :(

from apidocs.

f2m2rd avatar f2m2rd commented on June 2, 2024

My Steps are as follows:

  1. Add "f2m2/apidocs": "dev-master" to "require-dev":
  2. run composer update
  3. Add F2m2\Apidocs\ApidocsServiceProvider::class to providers in config/app.php
  4. run composer dumpautoload
  5. Upate my routes add my endpoints to an API Prefix Group Route::group(['prefix' => 'api/v1'],function(){....}
  6. run php artisan:apidocs generate

Post your composer.json file if you can.

from apidocs.

lear2012 avatar lear2012 commented on June 2, 2024

Are you sure
4. run php artisan:apidocs generate
not php artisan apidocs:generate?

Here is part of my composer.json:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.",
"barryvdh/laravel-debugbar": "~2.0",
"php-curl-class/php-curl-class": "~4.8",
"arcanedev/seo-helper": "~0.15",
"predis/predis":"1.0.3",
"f2m2/apidocs": "dev-master"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.
",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},

from apidocs.

lear2012 avatar lear2012 commented on June 2, 2024

I followed your steps, but nothing new happened :(

from apidocs.

f2m2rd avatar f2m2rd commented on June 2, 2024

I just created a brand new Laravel 5.1.* project and added f2m2/apidocs to composer, created a test controller, setup the routes, and successfully ran the php artisan apidocs:generate command.

I've attached the project so that you can use as an example:
apidocs-test.zip

from apidocs.

lear2012 avatar lear2012 commented on June 2, 2024

I'm afraid it is my environment's problem, so i need to fix it first, thanks for the help!

from apidocs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.