Download the PHP package rduuke/newbie without Composer

On this page you can find all versions of the php package rduuke/newbie. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package newbie

StyleCI Total Downloads Latest Stable Version Latest Unstable Version License

Newbie

Installation:

Composer:
Configuration Files:

The file config\Config.php data from the database is added and define the two global routes BASE_URL and BASE_PUBLIC.

Directory Structure:

The HTTP Layer

Route

Basic Routing:

The most basic Newbie routes simply accept a URI and a Closure, providing a very simple and expressive method of defining routes:

All Newbie routes are defined in your route files src/routes.php. Available Router Methods: The router allows you to register routes that respond to any HTTP verb:

Route Parameters

Required Parameters:

Of course, sometimes you will need to capture segments of the URI within your route. For example, you may need to capture a user's ID from the URL. You may do so by defining route parameters:

Optional Parameters:

Occasionally you may need to specify a route parameter, but make the presence of that route parameter optional. You may do so by placing []; Make sure to give the route's corresponding variable a default value:

Route Groups

Route groups allow you to share route attributes , across a large number of routes without Needing to define Those attributes on each single route . Shared attributes are specified in an array format as the first parameter.

Route Controller:

Controllers:

Defining Controllers:

Below is an example of a basic controller class. Note that the controller extends the Controller class included with Newbie(Slim3/Controllers). The Controller class provides a few convenience,

Resource Controllers:

To use your controller REST structure , you must implement the interface ResourceController Methods:

Database

Query Builder:

Capsule importing the class, we can use the query builder.

Other core methods May be Directly accessed from the Capsule in the same manner as from the DB facade :

Using The Eloquent ORM:

For further documentation on using the various database facilities this library provides, consult the Laravel framework documentation.

Views

Creating Views:

Views contain the HTML served by your application and separate your controller / application logic from your presentation logic. Views are stored in the resources/views directory. A simple view might look something like this:

Since this view is stored at resources/views/testing.tpl.php, we may return it using the global view helper like so:

Creating a Layouts:

To save the Repeated many times the same blocks of code in the views can be generated layout , These will be stored in the directory resource/view/layout, A single Layout Might look something like this :

Using the design in view blog.tpl.php

Helpers

They are in the src/Tools/Helpers.php file in this file can modify or add new helpers.

redirect:

Receives as a string with the path to the redirection.

style:

Receives as a parameter the path where is the css public/css/template.css file, only use in the view or layout.

script:

Receives as a parameter the path where is the js public/js/template.js file, only use in the view or layout.

route:

Get two obligatory and 2 optional parameters , are mandatory and the url link name , the two are optional data url html tag and attributes , just use viees recommended or layout. Example:

newFlashMessage:

It takes two obligatory parameters and one optional , is used to generate alerts flash. Type: Edit public/css/template.css

getFlashMessage:

which asks whether there is a warning flash with that message. returns true if otherwise false.

printFlashMessage:

which is the name of the alert to show, style alerts are the chips materialize.

arrayAdd:

Adds an item to a key value array.

arrayFirst:

He gets the first element of an array

arrayLast:

Gets the last element of an array.

arrayJson

Transforms an array to json.

jsonObject

Transforms a json to an object.

jsonArray:

Transforms a json to an array.

strLimit

It limits the number of carateres containing a string, for default is 10.

strRandom

Generates a random string of characters , according to the assigned limit, for default is 10.

Note:

Any suggestions or concerns can do in [email protected] ó @RDuuke


All versions of newbie with dependencies

PHP Build Version
Package Version
Requires illuminate/database Version ^5.3
filp/whoops Version ^2.1
league/plates Version ^3.1
php Version >=5.5.9
slim/slim Version ^3.0
martynbiz/slim3-controller Version ^0.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rduuke/newbie contains the following files

Loading the files please wait ....