Skip to content

Instantly share code, notes, and snippets.

  • Database
    • Connection.php
    • QueryBuilder.php
  • index.php
  • task.blade.php
Connection.php
<?php
class Connection

Array_filter() :

<?php
class Post
{
    public $title;
    public $published;

    public function __construct($title, $published){
 $this-&gt;title = $title;

According to the official website MongoDB is a document database that provides high performance, high availability, and easy scalability.
MongoDB falls into the group of documents-oriented NoSQL databases
steps to use mangodb with php:

  1. Head on over to the downloads page on the MongoDB official website. Click on the download link for the latest stable release under Windows. Install it
  2. Windows users can download precompiled binaries of the extension from PECL. After extracting the php_mongodb.dll file to PHP’s extension directory, add the following line to your php.ini file: extension=php_mongo.dll
  3. Following is the preferred way of installing this library with Composer
    composer require mongodb/mongodb

Laravel

routes:
In laravel routes are seen in routes/web.php file

Route::get('/', function () {
    return view('welcome');
});

requests: