Recent Questions

متن مرتبط با «what does it mean when you dream about snakes» در سایت Recent Questions نوشته شده است

[Updated] Free Mobile-Friendly Layout Wizard

  • Updated: The Free Mobile-Friendly Layout Wizard has been updated. It will now place the meta charset tag before the title in the head section (so that it will be in the first 1 KB of your page even if you have a long title). In addition, if you select HTML5 as the output type, the shorter meta charset tag will be used., ...ادامه مطلب

  • GitHub patch release previous version

  • On Github you way from time to time need to patch release the previous version of a published release.  This took me longer than I care to admit to understand the steps involved. Hence I'm documenting them in this post. Step 1: Check out the branch corresponding to the previous version of your code. git checkout 7.3.0 Step 2: Fix the bug in the code. Let's say it's a breaking change that's been fixed in the code. Step 3: Commit the changes with a version number that indicates the patch release. Commit the fix git commit -m "Fix bug in 7.3.0" Next, create a new tag git tag 7.4.0 Step 4: Push the changes to the remote repository. git push origin 7.4.0 Step 5: Create a new release for the patch version on GitHub. Navigate to the main page of the repository on GitHub.com, click on the Releases tab, and then click on the "Draft a new release" button. Step 6: Fill in the details for the release in the form, select the tag created from Step 3, and fill in the release notes. Once you have filled in the details, click on the "Publish release" button to publish the release. بخوانید, ...ادامه مطلب

  • Extracting a time into select menus with PHP

  • That begs the question how do you separate the time into seperate elements? Making use of explode can work. Exploding where there a : so: $parts = explode(':', '14:25:00'); This would result in an array: [ "14", "25", "00", ] To use an element you can refer to its index for example $parts[0] would contain 14 Using them by their index is fine to do but kinda messy. I prefer to give each element a name using the list function list($hours, $minutes, $seconds) = explode(':', '14:25:00'); When using list() passing an array to it will allow you to name each index of the array in the order listed. Putting this into practice I like to define the null versions before using list to ensure the variables will exist. $estimatedTime = 14:25:00; $estimatedHour = null; $estimatedMinute = null; $estimatedSeconds = null; list($estimatedHour, $estimatedMinute, $estimatedSeconds) = explode(':', $estimatedTime); Now we have the variables that can be used in select menus: note I'm using Blade syntax here for readability. <select name="estimatedTime_hour"> <option value="0">Hours</option> @foreach(range(0,23) as $hour) <option value="{{ $hour }}" {{ old('estimatedTime_hour', $estimatedHour) == $hour ? 'selected=selected' : '' }}>{{ $hour }}</option> @endforeach </select> <select name="estimatedTime_minute"> <option value="0">Minutes&l, ...ادامه مطلب

  • I'm writing a new Laravel book on testing called Laravel Testing Cookbook

  • Laravel Testing Cookbook will cover common use cases and will be ready in a few months time. Sign up for the waitlist to be notified when it's ready! The book will cover both PestPHP and PHPUnit. Use the book as a reference for practical examples of testing URLs, Forms, Interactions, Transactions, using third-party API's and more. Join the waitlist or pre-order at https://laraveltestingcookbook.com/ بخوانید, ...ادامه مطلب

  • [Updated] Feedback Form Wizard: improved PHP 8 (8.0, 8.1, etc) compatibility

  • The script generated by the Feedback Form Wizard has been updated to improve compatibility with PHP 8 (eg, 8.0, 8.1, etc). Note: if you have generated your form and script after 1 January 2023, you already have this version (ver 3.2.0). , ...ادامه مطلب

  • Upload images in Ckeditor 5 with Laravel

  • CKeditor 5 out of the box does not come with upload capabilities. Uploading is supported with its plugins, some are official paid plugins that require subscriptions. There are a few free options. Base64 upload adapter This plugin allows uploads that will convert an uploaded image into base64 data. Very easy to use but will require you to save the complete base64 code with the post, this can be get long. Docs Simple image adapter An image upload tool. It allows uploading images to an application running on your server using the XMLHttpRequest API with a minimal editor configuration. Docs Use the online builder to add the simple image adapter then download the generated bundle unzip and place the folder inside a publicly accessible place in Laravel. such as /public/js/ckeditor5 Then link ckeditor.js in the pages you want to use Ckeditor <script src="/js/ckeditor5/build/ckeditor.js"></script> Using Ckeditor in a textarea. I've made a blade component called Ckeditor so I can use: <x-form.ckeditor wire:model="content" name="content" /> To render the editor. I'm using Livewire and AlpineJS. The component looks like this: @props([ 'name' => '', 'label' => '', 'required' => false ]) @if ($label == '') @php //remove underscores from name $label = str_replace('_', ' ', $name); //detect subsequent letters starting with a capital $label = preg_split('/(?=[A-Z])/', $label); //display capi, ...ادامه مطلب

  • Adding pinned posts with Laravel

  • Let's say you have a blog and have posts ordered by their published date. Later you decide you want to pin certain posts. Pinned posts should be displayed before any other posts regardless of their published date. The Solution You can accomplish this by modifying the order clause in the query. Take this order: ->orderBy('published_at', 'desc') This will order posts by their published date in descending order. Adding a second-order clause: ->orderBy('is_pinned', 'desc')->orderBy('published_at', 'desc'); This time ordered by a is_pinned column then order by the published_at column. This will show the posts pinned first and then show the posts in their published order. The Setup Adding a migration to add a column called is_pinned to a posts table php artisan make:migration add_pinned_field_to_posts Migration <?php use IlluminateSupportFacadesSchema; use IlluminateDatabaseSchemaBlueprint; use IlluminateDatabaseMigrationsMigration; class AddPinnedFieldToPosts extends Migration { /** * Run the migrations. * * @retu void */ public function up() { Schema::table('posts', function (Blueprint $table) { $table->boolean('is_pinned')->default(false); }); } /** * Reverse the migrations. * * @retu void */ public function down() { Schema::table('posts', function (Blueprint $table) { $table->dropColumn('is_pinned'); , ...ادامه مطلب

  • Write an SEO-friendly title: A quick start guide

  • As a website owner or content creator, you know how important it is to write great titles. Not only do titles need to be reader-friendly so that people will actually want to click on them, but they also need to be search engine friendly in order to ensure good click-through rates and rankings. So how do you strike the perfect balance? By following some best practices for writing SEO-friendly titles, of course! Keep reading to lea more. One of the most important things you can do when writing an SEO-friendly title is to include focus keywords. Focus keywords are the words or phrases that best describe your page's content and are most likely to be used by people when searching for something related to your page. However, it's important to use focus keywords sparingly—too many keywords will not only tu off readers but also trigger search engine penalties for keyword stuffing. In addition to including focus keywords, another important factor to consider when writing SEO-friendly titles is length. We're not talking about character count here—although that's important, too—but rather the number of words in your title. A good rule of thumb is to keep your titles between 50 and 60 characters so that they're easy to read and don't get cut off in search engine results pages. Of course, there will be exceptions to this rule, but as a general guideline, it's a good one to follow. Titles are designed to grab readers' attention and entice them to click through to your articl, ...ادامه مطلب

  • Expression Web Tutorial: How to Design a Website with Microsoft Expression Web

  • Microsoft's free web editor is a sophisticated WYSIWYG web editor with many features usually only found in commercial offerings (and no wonder, since it was previously something you had to buy). This tutorial series takes you through the process of designing a fully functional multi-page website with Expression Web., ...ادامه مطلب

  • What's the Difference Between a Domain Name Registrar and a Web Host?

  • This article on whether a domain name registrar is the same thing as a web host answers a question I was asked by a visitor., ...ادامه مطلب

  • [Updated] BlueGriffon Tutorial: Design a website using the open source BlueGriffon web editor

  • The entire BlueGriffon Tutorial has been updated for the version 3 series of BlueGriffon. Those thinking of using it to create a website can find the complete series online., ...ادامه مطلب

  • What To Do If You Do Not Own Your Website's Domain Name

  • What if someone else owns the domain on which your website sits? For example, as it was in the case of one of my visitors, someone may have bought the domain for you, and retained ownership of it. Or perhaps your website is on a free web host, or a blog host, and you are using the web address given to you by them. This article deals with how you can solve that problem (or potential problem)., ...ادامه مطلب

  • [Updated] Free Mobile-Friendly Layout Wizard: now creates 1, 2, 3 column websites

  • For the sake of completeness (and also because a visitor requested it), the Layout Wizard has been updated to support one column websites as well. As a result, it can now create one, two and three column websites (depending on which you prefer). The generated web page is mobile-friendly and completely customizable. There are no advertisements, and nothing you enter into the Wizard is recorded anywhere. And it's free., ...ادامه مطلب

  • How to Create a Website (Updated)

  • If you are thinking of designing a website, whether a business or hobby site, read How to Create a Website. The article has been updated with the latest developments on the Inteet. , ...ادامه مطلب

  • How to Insert a Bullet Point (Unordered) List with BlueGriffon

  • This article shows you how to insert a bullet point list (where each item on the list is marked with a solid black circle rather than numbered) into a web page using the BlueGriffon web editor., ...ادامه مطلب

  • جدیدترین مطالب منتشر شده

    گزیده مطالب

    تبلیغات

    برچسب ها