Skip to content

Releases: nova-framework/framework

Updated Bootstrap js and jQuery

21 May 09:49
Compare
Choose a tag to compare
v3.26.2

Updated bootstrap js and jQuery

Fix typo on Http\Response

21 May 09:31
Compare
Choose a tag to compare
Merge pull request #864 from LuckyCyborg/master

Fix typo on Http\Response

implementation of a simple but very powerful **Request API**

21 May 09:26
Compare
Choose a tag to compare

This pull request introduce a implementation of a simple but very powerful Request API, built in top of Symfony HTTP Foundation, and being similar with its counterpart Laravel 4.x, of what documentation apply, excluding the Session part, which is not (yet) completed / integrated with the Framework.

The objective is to create a fully functional support for HTTP Requests, even for complicated RESTful APIs, in the same time to simplify the input data handling on a daily base.

The usage could be very simple, as in following example, together with the Validator:

use Validator;
use Input;

$rules = array(
    'username' => 'required|min:3|max:50|alpha_dash|unique:users',
    'password' => 'required|between:4,30',
    'email'    => 'required|email|max:100|unique:users',
);

// Collect all input data - i.e. $_POST and $_FILES, for a POST Request
$data = Input::all();

$validator = Validator::make($data, $rules);

if ($validator->passes()) {
    // Do something shiny, the input data is perfect.
} else {
    $errors = $validator->errors()->all();

    // Do something nasty, because the data is wrong.
}

A more simple example is:

if (Input::has('username')) {
    $username = Input::get('username');

    // Do something shiny with this variable
}

But this new Request API is not only about that, for example, you can simply detect a AJAX Request, just like in the actual API:

if(Request::ajax()) {
    // You are set, this is a AJAX Request
}

OR see if you have a POST Request:

if(Request::method() == 'POST') {
    // You are set, this is a POST Request
}

Finally, there apply almost the entire Illuminate\Request v.4.x API, for example, you can do:

if (Request::isJson()) {
    // Get the variable 'result' from the JSON encoded Content
    $result = Request::json('$result');
}

OR

// Get the current path info for the request.
$path = Request::path();

To note that, while present, it is not possible yet to use the Session (and Flash) methods from Http\Request, because the Session\Store is not full integrated on Nova.

Also, it is not possible yet to use the Response API, which while completed, is not yet intergrated full, then it is safely to ignore it for moment.

Improve the Language System and the compatibility with PHP7 on Validation\Factory and Validation\Validator

20 May 15:27
Compare
Choose a tag to compare
Merge pull request #858 from LuckyCyborg/master

Improve the Language System and the compatibility with PHP7 on Validation\Factory and Validation\Validator

Adjust Core\Template for better compatiblity with PHP7

20 May 12:52
Compare
Choose a tag to compare
Merge pull request #856 from LuckyCyborg/master

Adjust Core\Template for better compatiblity with PHP7

Synchronize the Layouts and Core\Template with the new Language API

20 May 10:02
Compare
Choose a tag to compare

HOT-FIX about synchronizing the previous merged commits with the new Language API.

optimizations on Language System and add a dedicated Facade

20 May 08:59
Compare
Choose a tag to compare

This pull request introduce optimizations on Language System and add a dedicated Facade to, solution giving the ability to simplify the logic of the Core\Language.

Also, is improved the displaying of Language Changer on Default Template, now indicating the current Language.

Finally, this pull request introduce improvements into Helpers\Request, as in adding support for the HEAD, PUT, DELETE and OPTIONS methods, for a enhanced RESTful APIs experience; also moving it to Core\Request as being a vital part of the Framework and not a (optional) Helper.

To note that this pull request do not introduce any API breaks.

This pull-request introduce a simple RTL Layout System for right alignment languages.

overall optimizations, add the **Danish Language** and a new SQL script dump

19 May 14:16
Compare
Choose a tag to compare

This pull request introduce overall optimizations, add the Danish Language and a new SQL script dump, which contains a consistent database structure, to permit even tests on the (future) ORM's Relations.

Also is introduced a better Languages Menu on the Default Template, which automatically generate the links on base of App configuration and show the Language names in the native way.

To note that is introduced into View::make() the ability to pass the Module name as second parameters. E.g

public function dashboard()
{
    return View::make('Users/Dashboard', 'Users')
        ->shares('title', __d('users', 'Dashboard'));
}

A similar ability is added to Template::make(), permitting pass the custom Template name as second parameters. E.g

public function dashboard()
{
    $user = Auth::user();

    $data = array(
        $message => __('Welcome back, {0}!', $user->username)
    );

    return Template::make('default', 'Admin')
        ->shares('title', __d('users', 'Dashboard'))
        ->nest('content', 'Users/Dashboard', $data);
}

Finally, this pull request move the Facades: Database\Facade, Events\Facade, Validation\Facade to the namespace \Support\Facades, being available now as:

Support\Facades\Database
Support\Facades\Event
Support\Facades\Validator

Add setter for display value.

Now u can use Logger::setDisplay(true); in Config file to show errors on page, not only in logfile

Assorted optimizations and fixes

18 May 21:33
Compare
Choose a tag to compare

Optimize the Language System
Template style alignment and Update Persian language

Validation Engine

18 May 18:14
Compare
Choose a tag to compare

This pull request introduce a simple but powerful Validation Engine, in a Laravel-esque style.

Its Validation Rules and the basic usage are similar with Illuminate\Validation v4.x, but no Files Validation support.

To note that it use the new Database API for verification of data presence into Database. Then, if you use this Validation, is a must to use also the new Database API in the entire application, and NOT the variant given by Helpers\Database.

Also to note that for the translation of error messages, it use the new Language API.

The Validation usage is simple, as in following example:

use Validator;

$data = array(
    'username' => 'michael',
    'password' => 'password',
    'email'    => '[email protected]'
);

$rules = array(
    'username' => 'required|min:3|max:50|alpha_dash|unique:users',
    'password' => 'required|between:4,30',
    'email'    => 'required|email|max:100|unique:users',
);

$validator = Validator::make($data, $rules);

if ($validator->passes()) {
    echo '<h3>Data validated with success!</h3>';

    echo '<pre>' .var_export($data, true) .'</pre>';
} else {
    $errors = $validator->errors()->all();

    echo '<pre>' .var_export($errors, true) .'</pre>';
}

Also, this pull request introduce optimizations into Language System and framework-wide functions.