Skip to content

ildrm/pagequotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Page Quotes!

Use PageQuotes to initial the configuration and use printQuotes to print the quotes:

$quotes = [
	'quotes' => [
		'page1' => [
			'Quote1', 'Quote2'
		]
	]
];

$q = new  PageQuotes($quotes);
return  $q->printQuotes('page1');

How to use it in Laravel/Lumen: Note: This is a simple example that shows how to use the code but it is suggested to use it in the controller

Route::get('/test1', function () {
    $quotes = [
        'quotes' => [
            'page1' => [
                'Quote1', 'Quote2'
            ]
        ]
    ];
    
    $q = new PageQuotes($quotes);
    return $q->printQuotes('page1');
});

Route::get('/test2', function () {
    $quotes = [
        'quotes' => [
            'page1' => [
                'Quote1', 'Quote2'
            ]
        ]
    ];
    
    $q = new PageQuotes();
    $q->init($quotes);
    return $q->printQuotes('page1');
});

About

Page Quotes Package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages