I'm new to FuelPHP and need to implement PHPSpellChecker Class. I can't find any help related to its implementation with FuelPHP. I'm trying it out by creating a package but I'm not sure how to proceed. : (
Please help me out and guide me what steps I should follow.
$mySpell->InstallationPath: is used to call a js file which is placed within the phpspellcheck folder in vendor. If you have gone through it you can find it contains core folder where index file is placed and to access this file also it uses the same installation path.. and other related files are also getting called up using this path.. making it a bit more difficult for me to handle.
Is there a way to use js inside vendor folder??? What will be the relative path in that case??
In a standard FuelPHP installation all code is outside the DOCROOT (for security reasons), client-side files (js, css, images, etc) can not be stored with the code, they have to be in the public folder.
So either move the js files (to for example /public/assets/phpspellcheck) or create a controller for that loads and returns them, then use routes to route the requests for those files to that controller.
The first option is a lot easier, the second will allow you to update the phpspellcheck code without having to update your public files again.
Public URI paths are relative to public, so anything in the /public/assets/ folder can be accessed via http://yourhostname/assets/...
But since it is using a common installation path variable for js as well as php file it is becoming difficult for me to manage, I'm trying the first option you suggested, hope will reach to a solution.