This plugin can be embedded in PHP application to give the web application specific routes/href

Overview

Routes Plugin PHP

This plugin can be embedded in PHP application to give the web application specific routes/href location and for entering specific/locations for each page in a web application

Usage

Startup

<?php
require('./controller/routes/routes.php');
$route = new Route(); 

Stylesheets and scripts

$route->addscripts('script.js');
$route->addstylesheets('style.scss');

Routings

// Basic Pages
$route->homepage('home.php'); // Adding Home Page
$route->error404('error404.php'); // Adding 404 Error Page

// Other Pages
$route->add('/users','users.php');
$route->add('/register','reg.php');
$route->init(); // Starting the routing

?>

Pages

All the pages are located in ./controller/pages

Scripts

All the scripts are located in ./controller/scripts/

Stylesheets

All the pages are located in ./controller/styles/

Extracomponents

There are two args when loading the extracomponents:

  • local Located in the Local Computer
  • web Sourced directly from the web
<?php

$route->loadbootstrap('local');
$route->loadpyscripts('local');
$route->loadfontawesome('web');

Installation

git clone https://github.com/teddyoweh/Routes-Plugin-PHP.git
cd Routes-Plugin-PHP

Testing

<?php
require('./controller/routes/routes.php');
$route = new Route(); 

// Stylesheets and scripts
$route->addscripts('script.js');
$route->addstylesheets('style.scss');
$route->loadbootstrap('local');
$route->loadpyscripts('local');
$route->loadfontawesome('web');
$route->loadjquery('local');

// Routings

// Basic Pages
$route->homepage('home.php'); // Adding Home Page
$route->error404('error404.php'); // Adding 404 Error Page

// Other Pages
$route->add('/users','users.php');
$route->add('/register','reg.php');
$route->init(); // Starting the routing



?>
 

Starting Test Server

php -S localhost:8000

Moving Plugin

 cp routes.php /new_directory

License

MIT License

Copyright (c) 2021 Teddy Oweh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Hire me: teddyoweh

You might also like...
My intention with this app is that new developers can have a concrete application with Laravel + VueJS where they can use it as example to learn the right way
My intention with this app is that new developers can have a concrete application with Laravel + VueJS where they can use it as example to learn the right way

My intention with this app is that new developers can have a concrete application with Laravel + VueJS where they can use it as example to learn the right way, implementing the best practices possible and at the same time learn how TDD is done. So this will be an example application but completely usable for any similar case.

Package to send customer specific prices to Magento from a Laravel application using a configurable source.

Laravel Magento Customer Prices This package provides a way to add customer specific prices to Magento from a Laravel app. By default, it uses the Mag

A PHP library that can be used manually as well as a CLI script that you can just run on your file

Run phpcs on files and only report new warnings/errors compared to the previous version. This is both a PHP library that can be used manually as well

JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

Iran decoration platform is an open source Php web application where you can find your job as a freelancer working in people home in decoration positions and others.

Iran-Decoration Platform Iran decoration platform is an open source Php web application where you can find your job as a freelancer working in people

Magento specific extension for phpstan

bitexpert/phpstan-magento This package provides some additional features for PHPStan to make it work for Magento 2 projects. Installation The preferre

Tool to remove code based on specific comments.

PHP-DEL Tool to remove code based on specific comments. Configuration Create php-del.json in the root directory of the project { "dirs": [ "src"

Magento 2 specific tasks for Capistrano 3

Capistrano::Magento2 A Capistrano extension for Magento 2 deployments. Takes care of specific Magento 2 requirements and adds tasks specific to the Ma

An object store for specific objects.

Object Storage A simple object storage class that will only allow "supported" objects. class MyObjectStorage extends Herrera\Util\ObjectStorage {

Owner
Ifechukwudeni Oweh
Machine Learning & FullStack Developer.
Ifechukwudeni Oweh
The goal of this course is to give you a brief introduction to GitHub.

?? The Basics of GitHub ?? Course overview and learning outcomes The goal of this course is to give you a brief introduction to GitHub. We’ll also pro

DAW 1 Dec 13, 2021
High-performance, low-memory-footprint, single-file embedded database for key/value storage

LDBA - a fast, pure PHP, key-value database. Information LDBA is a high-performance, low-memory-footprint, single-file embedded database for key/value

Simplito 12 Nov 13, 2022
Give your Magento Admin a facelift.

Installation on Magento 1.7.x, 1.8.x, 1.9.x Install with modgit: $ cd /path/to/magento $ modgit init $ modgit clone admin-theme https://github.com/jre

Johann Reinké 225 Sep 18, 2022
QuidPHP/Main is a PHP library that provides a set of base objects and collections that can be extended to build something more specific.

QuidPHP/Main is a PHP library that provides a set of base objects and collections that can be extended to build something more specific. It is part of the QuidPHP package and can also be used standalone.

QuidPHP 4 Jul 2, 2022
A PocketMine-MP Plugin that allow you to change your nickname to specific colors

General Home A PocketMine-MP Plugin that allow you to change your display nametag to specific colors Made By BabosApple And Updated To PM4 By ZhorifCr

ZhorifCraft451 0 Feb 22, 2022
A PocketMine-MP plugin that allows you to mute players permanently and for a specific time.

BetterMute - v1.1.1 A PocketMine-MP plugin that allows you to mute players permanently and for a specific time. Features easy mute players permanent o

supercrafter333 7 Dec 21, 2022
A plugin to make life easier for users who need to edit specific functions of a world and also create, rename and delete worlds quickly using commands or the world management menu.

A plugin to make life easier for users who need to edit specific functions of a world and also create, rename and delete worlds quickly using commands or the world management menu.

ImperaZim 0 Nov 6, 2022
It is a simple blog application coded with PHP, HTML, CSS. You can develop, edit. You can see it as a skeleton. ⚡

PHP-BLOG-SYSTEM Simple blog system Features Adding Text Update Text Text Deletion User Login and register Bootstrap Design Profile Page How to use blo

Selçuk 2 Aug 21, 2022
Simple way to auto load modules without complicate definition of routes

Phalcon-autorouter Version 2.0 Example full application with various libraries included in this example Change log Structure have been changed and upd

Kamil 28 Dec 27, 2022