• This repository has been archived on 21/Jan/2024
  • Stars
    star
    107
  • Rank 323,587 (Top 7 %)
  • Language
    PHP
  • Created almost 5 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Access your Bear notes in Laravel

Bear-Sync

This package provides an Eloquent model called BearNote that can access your local Bear notes without any configuration at all.

Install

composer require calebporzio/bear-sync

Use

Basic Usage

$note = BearSync\BearNote::whereTitle('Some Note Title')->first();

App\Post::create([
    'title' => $note->title,
    'content' => $note->content,
])

Full API

// Search all your Bear notes.
$notes = BearSync\BearNote::searchByTitle('Some Note Title');

// Find a specific note.
$note = BearSync\BearNote::whereTitle('Some Note Title')->first();

// Get tags by note
$tags = $note->tags

// Find a Bear tag named "blog"
$tag = BearSync\BearTag::whereTitle('blog')->first();

// Get Bear notes by tag
$notes = $tag->notes;

// Access the note's contents.
$note->id; // Bear's note id.
$note->title;
$note->content;
$note->checksum; // A checksum of the note's content, so you can detect updates.

// Fetch it's content and replace/store images.
$note->getContentAndStoreImages(function ($originalPath, $newFileName) {
    $publicFileName = "/images/{$newFileName}";

    // Copy the image and store it locally (presumably in a public directory).
    \File::copy($originalPath, public_path($publicFileName));

    // Return the file path to be referenced in the Bear note's markdown.
    // ![]($publicFileName)
    return $publicFileName;
});

More Repositories

1

sushi

Eloquent's missing "array" driver.
PHP
2,570
star
2

awesome-helpers

Helper functions I find super-duper handy
PHP
629
star
3

onboard

A Laravel package to help track user onboarding steps.
PHP
439
star
4

gitdown

A simple package to parse Github Flavored Markdown in PHP
PHP
219
star
5

better-phpunit

A better PHPUnit test runner for VS Code
TypeScript
211
star
6

laracasts-livewire-datatable

The Laravel project I used during the "Building DataTables with Livewire" Laracasts video
PHP
118
star
7

tailbuild

A simple command to build a Tailwind CSS file for your project (with JIT compiling and watching)
JavaScript
89
star
8

laravel-helpers-file

Because I can never remember exactly how to autoload my helpers.php file.
PHP
61
star
9

laravel-frontend-preset

My personal frontend preset for new laravel applications.
PHP
31
star
10

laracon-online-2020

The Laravel project used in my Laracon Online 2020 talk
PHP
28
star
11

laracasts-building-alpine

JavaScript
27
star
12

simple-php-cs-fixer

A VS Code extension for simple php-cs-fixer integration
PHP
24
star
13

sps

TypeScript
20
star
14

vue-form-state

JavaScript
19
star
15

vercel-laravel

PHP
19
star
16

click

The podcast recording and editing suite of your dreams. Featuring just the one button.
Crystal
18
star
17

livewire-uncovered

PHP
13
star
18

laracasts-turbolinks

The source app from my Laracasts turbolinks video.
PHP
11
star
19

usesushi.dev

The website for sushi
PHP
10
star
20

presettings

A VS Code extension for storing and activating settings presets
TypeScript
10
star
21

laracasts-server-fetched-partials

The Laravel app used in my Laracasts episode on "Server-Fetched Partials"
PHP
10
star
22

laracasts-cached-server-fetched-partials

The finished Laravel app from my "Caching Server Fetched Partials" video.
PHP
10
star
23

vue-fetch-html

A little component for fetching html/vue/javascript from the server.
Vue
9
star
24

livewire-bot

Livewire's GitHub bot
PHP
7
star
25

laravel-acceptance-example

An example laravel project with acceptance tests that render javascript and work well with laravel's helpers.
PHP
7
star
26

model-inheritance

PHP
6
star
27

99bottles-php

PHP
4
star
28

edoc-2019

PHP
4
star
29

vue-example-component

For when you regret getting rid of the default Laravel ExampleComponent.vue
Vue
3
star
30

screendit

PHP
3
star
31

calebporzio

3
star
32

johnny

HTML
2
star
33

dotfiles

Shell
2
star
34

write-less-js

PHP
1
star
35

advent-of-code-2018

My Advent Of Code solutions for 2018
PHP
1
star
36

rm-me

1
star
37

spend-mo

JavaScript
1
star
38

psrpoetry

HTML
1
star
39

ingenuity

CSS
1
star
40

ingenuity-teaser

HTML
1
star
41

theretireddevtheme

A modified ghost (blog) theme for theretireddev.com
CSS
1
star